[Edited] What is "class" code?

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
Not a clue what you mean :)
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/


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
Topic archived. No new replies allowed.