Just remember that there is very little difference between a struct and a class in C++. And remember one of the greatest strengths, IMO, of C++ is Classes. Information hiding and encapsulation are a...
Type: Posts; User: jimblumberg
Just remember that there is very little difference between a struct and a class in C++. And remember one of the greatest strengths, IMO, of C++ is Classes. Information hiding and encapsulation are a...
Why not use a constructor for your class?
struct StudentRecord
{
StudentRecord() : ID(1234), GPA(4.0)
{
strcpy(Name, "SuperProgrammer");
}
Very!
What's wrong with something like:
char array[name_size] = "SuperProgrammer";
Jim
Out of bounds because you try to access your array past the end of the array. You defined your array with a size of name_size so when you try to access name_size you're accessing your array out of...
Your function call, function implementation and function prototype must all agree as to the number and type of parameters.
Also you need to add some variable names to your function...