Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Need help with a string function call


I'm just beginning to learn how to code in C++ after having taken college classes on Visual C# and Java. I have a bit of a predicament that I would like help with if at all possible.

I am using a book called "C++ for Dummies, Second edition" that was written and published in 2008. I am trying to call a string function in my main function from a seperate file using a header (include "somestuff.h" for instance). My compiler recognizes the header and the function but for some reason I can not output the result to console. Here's my code and the error.

#include "somestuff.h";

using namespace std;

int main()
cout << "Surprise, surprise!" << endl;
cout << "The combination is (once again)" << endl;
cout << SafeCracker(12) << endl;

return 0;

Error: no operator "<<" matches these operands

I've been getting the same error across two compilers, one of which is Visual Studio 2010 and the other being the latest version of Code Blocks. I know the solution is probably relatively simple, so any help would be much appreciated.


Sign In or Register to comment.