Click here to Skip to main content
15,920,633 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get the Friendly name of the removable drive by the Drive letter ? Pin
Stuart Dootson28-May-09 2:32
professionalStuart Dootson28-May-09 2:32 
Questionhow can i find file in subFolder? Pin
002comp27-May-09 20:34
002comp27-May-09 20:34 
AnswerRe: how can i find file in subFolder? Pin
Nuri Ismail27-May-09 20:59
Nuri Ismail27-May-09 20:59 
AnswerRe: how can i find file in subFolder? Pin
«_Superman_»27-May-09 22:16
professional«_Superman_»27-May-09 22:16 
GeneralRe: how can i find file in subFolder? Pin
002comp27-May-09 23:24
002comp27-May-09 23:24 
AnswerRe: how can i find file in subFolder? Pin
Hamid_RT27-May-09 23:25
Hamid_RT27-May-09 23:25 
AnswerRe: how can i find file in subFolder? Pin
Michael Schubert28-May-09 0:54
Michael Schubert28-May-09 0:54 
Questiondelete( ) Pin
vital_parsley200027-May-09 20:18
vital_parsley200027-May-09 20:18 
AnswerRe: delete( ) Pin
CPallini27-May-09 21:08
mveCPallini27-May-09 21:08 
AnswerRe: delete( ) Pin
Stuart Dootson27-May-09 22:13
professionalStuart Dootson27-May-09 22:13 
AnswerRe: delete( ) Pin
Rajesh R Subramanian27-May-09 22:32
professionalRajesh R Subramanian27-May-09 22:32 
Questionlock Mouse and keyboard in c++ to use it in java through JNI Pin
jsfgeeks@gmail.com27-May-09 20:10
jsfgeeks@gmail.com27-May-09 20:10 
AnswerRe: lock Mouse and keyboard in c++ to use it in java through JNI Pin
Rajesh R Subramanian28-May-09 1:35
professionalRajesh R Subramanian28-May-09 1:35 
AnswerRe: lock Mouse and keyboard in c++ to use it in java through JNI Pin
paul_parero29-May-09 21:50
paul_parero29-May-09 21:50 
GeneralRe: lock Mouse and keyboard in c++ to use it in java through JNI Pin
jsfgeeks@gmail.com1-Jun-09 19:11
jsfgeeks@gmail.com1-Jun-09 19:11 
QuestionPen Drive Formate Pin
Davitor27-May-09 19:26
Davitor27-May-09 19:26 
QuestionHow to check whether the path selected is a drive name Pin
V K 227-May-09 19:23
V K 227-May-09 19:23 
AnswerRe: How to check whether the path selected is a drive name Pin
_AnsHUMAN_ 27-May-09 19:29
_AnsHUMAN_ 27-May-09 19:29 
AnswerRe: How to check whether the path selected is a drive name Pin
Rajesh R Subramanian27-May-09 22:07
professionalRajesh R Subramanian27-May-09 22:07 
AnswerRe: How to check whether the path selected is a drive name Pin
Stuart Dootson27-May-09 22:10
professionalStuart Dootson27-May-09 22:10 
Questionvc++ mfc( important please see it and reply me ) Pin
vkm198427-May-09 17:11
vkm198427-May-09 17:11 
AnswerRe: vc++ mfc( important please see it and reply me ) Pin
David Crow27-May-09 17:22
David Crow27-May-09 17:22 
QuestionCString replace function Pin
Muhammad Hassan Haider27-May-09 11:26
Muhammad Hassan Haider27-May-09 11:26 
AnswerRe: CString replace function Pin
Stuart Dootson27-May-09 13:46
professionalStuart Dootson27-May-09 13:46 
This question indicates you don't understand escaping and the role of backslashes in C string literals - when you enter a string in C/C++ source, the '\' character means 'step over the \ and treat the next character specially'

For instance, if you see \" in a C string literal, it means 'insert a double quote character' - as the double quote character is the string delimiter, this is the only way you can enter a double quote charcter.

This use of '\' means that you need to do something special to insert a '\' character in a string - that something special is '\\'.

So if you see this in some C/C++ code:

const char* path = "c:\\temp\\mypic.bmp";


what this means is that path will be assigned the address of the string c:\temp\mypic.bmp - note that the double backslash characters have been transformed to single backslashes.

So - your path doesn't need to be changed once it's in a CString - you can either assign the string literal version I showed above, or read the version with single backslashes using some form of user input, like this:

std::string path;
std::cin >> path;


I can enter c:\temp\mypic.bmp at the console window and that is what'll be assigned to path - no transformation of backslashes will happen from the command line.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

AnswerRe: CString replace function Pin
David Crow27-May-09 16:57
David Crow27-May-09 16:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.