[Edited] What is "class" code?

Mar 14, 2014 at 4:31pm
What is the user code? what I mean is the code "user" itself. Do you get my point?

1
2
3
4
5
6
7
#include <iostream>
using namespace std;

int main()
{
   user user1;
}


[Edit]
Okay, i just saw something like class user. Now, my new question is, what is the code "class"?

1
2
3
4
5
6
7
8
9
#include <iostream>
using namespace std;

int main()
{
   class user;

   user user1;
}
Last edited on Mar 14, 2014 at 5:09pm
Mar 14, 2014 at 4:36pm
Not a clue what you mean :)
Mar 14, 2014 at 5:50pm
Classes are an absolutely fundamental concept in Object Oriented Programming. Any C++ or OOP textbook or tutorial should tell you what they are. For example, on this very site:

http://www.cplusplus.com/doc/tutorial/classes/


Mar 14, 2014 at 5:58pm
classes are usually declared outside of the main function, and they're similar to any data structures you've seen before, they contain data members and member functions.
Last edited on Mar 14, 2014 at 5:58pm
Topic archived. No new replies allowed.