I am quite new to C++ and have looked at tutorials online for figuring out how to code all of these functions I have made. This is for an assignment, and I am not asking for any assistance in my coding as I am still planning on revising that later and doing a final run of error checks.
What I am seeking assistance with is that unlike Java, which I am used to, C++ uses header files. I'm not quite sure of the importance of them but for my assignment, and from what I have seen online they are required.
An example of part of my code is:
int getStringLength(string inputString)
{
int length;
length = size(inputString);
return length;
}
int main()
{
string testCase1 = getStringLength("Hello world!");
print(testCase1);
cin.get();
return 0;
}
How would I go about fixing my *.cpp file and using my current code so it's implemented into a *.h file?
Thanks