Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 1:11
mveRichard MacCutchan22-Nov-09 1:11 
GeneralRe: Error during compilation that I dont understand. Pin
stianhh22-Nov-09 9:37
stianhh22-Nov-09 9:37 
GeneralRe: Error during compilation that I dont understand. Pin
Richard MacCutchan22-Nov-09 11:41
mveRichard MacCutchan22-Nov-09 11:41 
AnswerRe: Error during compilation that I dont understand. Pin
Cedric Moonen22-Nov-09 3:58
Cedric Moonen22-Nov-09 3:58 
QuestionCode snippet for searching a file in directory (directory can have subdirectories in it) Pin
V K 221-Nov-09 19:16
V K 221-Nov-09 19:16 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
22491721-Nov-09 19:47
22491721-Nov-09 19:47 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
breezes2008_22-Nov-09 0:35
breezes2008_22-Nov-09 0:35 
AnswerRe: Code snippet for searching a file in directory (directory can have subdirectories in it) Pin
T210222-Nov-09 12:28
T210222-Nov-09 12:28 
In addition to FindFirstFile, you could use FileExists to search each directory for a match. If you intend to search subdirectories, you still need to to identify them.

#include <sys stat.h=""> //for FileExists
bool FileExists(char * const strFilename) {
struct stat stFileInfo;
bool blnReturn;
int intStat;
// Attempt to get the file attributes
intStat = stat(strFilename,&stFileInfo);
if(intStat == 0) {
// We were able to get the file attributes
// so the file obviously exists.
blnReturn = true;
}
else {
// We were not able to get the file attributes.
// This may mean that we don't have permission to
// access the folder which contains this file. If you
// need to do that level of checking, lookup the
// return values of stat which will give you
// more details on why stat failed.
blnReturn = false;
}
return(blnReturn);
}
QuestionConverting "C++" language code code to "C" language code. [modified] Pin
hivicky21-Nov-09 17:55
hivicky21-Nov-09 17:55 
AnswerRe: Converting "C++" language code code to "C" language code. Pin
Rajesh R Subramanian21-Nov-09 18:29
professionalRajesh R Subramanian21-Nov-09 18:29 
AnswerRe: Converting "C++" language code code to "C" language code. Pin
Richard MacCutchan22-Nov-09 1:58
mveRichard MacCutchan22-Nov-09 1:58 
AnswerRe: Converting "C++" language code code to "C" language code. Pin
tyftyftyf22-Nov-09 17:44
tyftyftyf22-Nov-09 17:44 
QuestionHow to initialize a modal dialog's controls? Pin
timbk21-Nov-09 11:38
timbk21-Nov-09 11:38 
AnswerRe: How to initialize a modal dialog's controls? Pin
timbk21-Nov-09 13:07
timbk21-Nov-09 13:07 
QuestionNumber Matching Pin
Humayun Kabir Hemoo21-Nov-09 0:19
Humayun Kabir Hemoo21-Nov-09 0:19 
AnswerRe: Number Matching Pin
Rozis21-Nov-09 1:49
Rozis21-Nov-09 1:49 
AnswerRe: Number Matching Pin
T210221-Nov-09 2:37
T210221-Nov-09 2:37 
AnswerRe: Number Matching Pin
Humayun Kabir Hemoo21-Nov-09 3:37
Humayun Kabir Hemoo21-Nov-09 3:37 
Questionmap saves class object and function pointer gives error [modified] Pin
Chanchalgaud20-Nov-09 22:42
Chanchalgaud20-Nov-09 22:42 
AnswerRe: map saves class object and function pointer gives error Pin
Cedric Moonen20-Nov-09 23:35
Cedric Moonen20-Nov-09 23:35 
AnswerRe: map saves class object and function pointer gives error Pin
Richard MacCutchan20-Nov-09 23:42
mveRichard MacCutchan20-Nov-09 23:42 
QuestionSHGetSpecialFolderPath(NULL, dir, CSIDL_LOCAL_APPDATA, FALSE) special path Pin
Chesnokov Yuriy20-Nov-09 22:11
professionalChesnokov Yuriy20-Nov-09 22:11 
AnswerRe: SHGetSpecialFolderPath(NULL, dir, CSIDL_LOCAL_APPDATA, FALSE) special path Pin
Rozis21-Nov-09 2:00
Rozis21-Nov-09 2:00 
QuestionRe: SHGetSpecialFolderPath(NULL, dir, CSIDL_LOCAL_APPDATA, FALSE) special path Pin
Chesnokov Yuriy21-Nov-09 8:23
professionalChesnokov Yuriy21-Nov-09 8:23 
QuestionRe: SHGetSpecialFolderPath(NULL, dir, CSIDL_LOCAL_APPDATA, FALSE) special path Pin
22491721-Nov-09 20:15
22491721-Nov-09 20:15 

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.