How can write out rep sign (\) ?

cout << "???";

the character '\' ? it would be

cout<<'\\'<<endl; //just the single character
cout<<"c:\\someFile"<<endl; //used as part of a string
//second prints to console "c:\someFile"

edit: ..... beaten to the punch again :'( lols

string str="\\";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.