I am extremely new to programing and I am trying to get this to work but for some reason I can't get it to run anything. I keep getting build errors....Can you help me?
You're much more likely to find an answer if you supply some code. It gives a great deal of context.
If it's just the use of size of, then you use it like this:
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
usingnamespace std;
int main()
{
int my_int = 50;
cout << "My int has a value of: " << my_int << endl;
cout << "My int has a size of " << sizeof(my_int) << " bytes" << endl;
return 0;
}
Will output:
My int has a value of: 50
My int has a size of 4 bytes
The sizeof function returns the size of your object in bytes.