Q:

How do you use the string class in a source file?

I am currently working on a c++ program with multiple files. (A main file, a header, and a source file)
I have included the string class in my files, yet my program is not compiling. It is giving me errors, saying that string is undefined, but I have clearly included it. I am using Microsoft Visual Studio Express 2013 for Windows Desktop, if you need to know.
Here are my files:
main.cpp:
#include "myClass.h"
#include <iostream>
using namespace std;
int main() {
    myClass myObject;
    cout << myObject.helloWorld() << "\n";
    return 0;
}

myClass.h:
#include <string>
class myClass {
public:
    string helloWorld();
};

myClass.cpp:
#include "myClass.h"
#include <string>
string myClass::helloWorld(){
    string str = "Hello World!\n";
    return str;
}

I have looked online, but have found nothing. I looked at the following links, if you would like to look:
http://www.cplusplus.com/forum/articles/10627/
http://www.sjbaker.org/wiki/index.php?title=C%2B%2B:_multiple_source_files
Thanks in advance!
P.S. It would be great to know how to manipulate strings in a source file, in general.

A:

The name of the type is std::string. Write it out in full, without shortcuts.

