I am busy with tutorial project and I am stuck on what I think is a really basic issue.
I have a main.cpp and I want to include a customer interface and implementation that I am writing. My interface needs to use some standard interfaces, but I keep getting erros when I include them.
To be more specific. I am writing a interface called strutils.h. Inside strutils, I need to declare some function prototypes that return a string value, so I have included the standard interface string (#include <string>) in the header. The compiler lists a whole host of errors when I try to compile.
I have added the strutils.h as a new item under "Header Files" in my project as well as the implementation file strutils.cpp under "Source Files"
Here is my strutils.h
----------------------------
#include <string.h>
Here is main.cpp
----------------------------
#include <iostream>
#include "strutils.h"
using namespace std;
void main ()
{
}
----------------------------
here are the errors:
----------------------------
Error 1 error C2146: syntax error : missing ';' before identifier 'ConvertToLowerCase' c:\users\rob\documents\2012\003.) hobbies & sport\003-003.) programming\003-003-004.) c++ projects\includes\strutils.h 3 1 CH-03-PE-04
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\rob\documents\2012\003.) hobbies & sport\003-003.) programming\003-003-004.) c++ projects\includes\strutils.h 3 1 CH-03-PE-04
Error 4 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\rob\documents\2012\003.) hobbies & sport\003-003.) programming\003-003-004.) c++ projects\includes\strutils.h 3 1 CH-03-PE-04
Thanks so much for the reply. As it turns out the answer is so obvious. I have just forgotten to use the correct namespace. My apologies for posting such a dumb question.
I know it is a "little" dated, but I like the nostalgia :)