954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to use a string variable

i need to know how to make a string variable in C++

i need to hold the file path of the desktop on a variable.

in vb.net it would be like this: dim path as string = "path\to\desktop"

sacarias40
Junior Poster
113 posts since Nov 2008
Reputation Points: 11
Solved Threads: 4
 
std::string path = "path\\to\\desktop";

Don't forget to include the header.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You