Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ classes

class MyClass {
  public:
    int myNum;
    string myString;
};

int main()
{
  MyClass myObj;

  myObj.myNum = 15;
  myObj.myString = "Some text";

  cout << myObj.myNum << "
";
  cout << myObj.myString;
  return 0;
}
 
PREVIOUS NEXT
Tagged: #classes
ADD COMMENT
Topic
Name
4+7 =