Click here to Skip to main content
16,011,883 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioniostream/fstream problem [modified] Pin
CoffeeAddict1918-Jul-06 8:41
CoffeeAddict1918-Jul-06 8:41 
AnswerRe: iostream/fstream problem Pin
earl18-Jul-06 12:02
earl18-Jul-06 12:02 
QuestionWindows File Access Monotoring Pin
sundar15618-Jul-06 8:35
sundar15618-Jul-06 8:35 
AnswerRe: Windows File Access Monotoring Pin
Chris Losinger18-Jul-06 11:24
professionalChris Losinger18-Jul-06 11:24 
AnswerRe: Windows File Access Monotoring Pin
Kharfax19-Jul-06 2:25
Kharfax19-Jul-06 2:25 
GeneralRe: Windows File Access Monotoring Pin
sundar1562-Aug-06 11:01
sundar1562-Aug-06 11:01 
Questionhook [modified] Pin
farshad.f18-Jul-06 7:47
farshad.f18-Jul-06 7:47 
AnswerRe: hook Pin
David Crow18-Jul-06 8:30
David Crow18-Jul-06 8:30 
You'd get a lot more help if you'd narrow this down to just a handful of lines. No one likes to wade through complete programs, or even several pages of code, to locate a problem. Try:

void main( void )
{
    char host[1024], szModName[1024], *host1; // initialize these accordingly
 
    if (! (host1 = strrchr(szModName, '\\')))
        strcpy(host, szModName);
    else
        strcpy(host, host1 + 1);
    
    FILE *fout = fopen("out.txt", "a+");
    fwrite(host, 1, strlen(host), fout);
    fclose(fout); 
}
Now step through each of these until you locate the offending statement.


"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

"Judge not by the eye but by the heart." - Native American Proverb


GeneralRe: hook Pin
farshad.f18-Jul-06 19:51
farshad.f18-Jul-06 19:51 
AnswerRe: hook Pin
Ali Rafiee18-Jul-06 9:28
Ali Rafiee18-Jul-06 9:28 
GeneralRe: hook Pin
farshad.f18-Jul-06 19:55
farshad.f18-Jul-06 19:55 
QuestionDesk Band Pin
neoandrew18-Jul-06 7:45
neoandrew18-Jul-06 7:45 
QuestionListing running Apps Pin
Kharfax18-Jul-06 7:23
Kharfax18-Jul-06 7:23 
AnswerRe: Listing running Apps Pin
Ravi Bhavnani18-Jul-06 7:30
professionalRavi Bhavnani18-Jul-06 7:30 
GeneralRe: Listing running Apps Pin
Kharfax18-Jul-06 7:37
Kharfax18-Jul-06 7:37 
AnswerRe: Listing running Apps Pin
Ali Rafiee18-Jul-06 7:43
Ali Rafiee18-Jul-06 7:43 
GeneralRe: Listing running Apps Pin
Kharfax18-Jul-06 7:48
Kharfax18-Jul-06 7:48 
GeneralRe: Listing running Apps Pin
ThatsAlok19-Jul-06 6:17
ThatsAlok19-Jul-06 6:17 
AnswerRe: Listing running Apps Pin
Hamid_RT18-Jul-06 18:56
Hamid_RT18-Jul-06 18:56 
GeneralRe: Listing running Apps Pin
Kharfax19-Jul-06 2:18
Kharfax19-Jul-06 2:18 
Questionifstream in mfc cause strange errors in debug only [modified] Pin
FredrickNorge18-Jul-06 6:24
FredrickNorge18-Jul-06 6:24 
AnswerRe: ifstream in mfc cause strange errors in debug only Pin
Maxwell Chen18-Jul-06 6:44
Maxwell Chen18-Jul-06 6:44 
GeneralRe: ifstream in mfc cause strange errors in debug only Pin
FredrickNorge18-Jul-06 6:49
FredrickNorge18-Jul-06 6:49 
GeneralRe: ifstream in mfc cause strange errors in debug only Pin
toxcct18-Jul-06 6:56
toxcct18-Jul-06 6:56 
AnswerRe: ifstream in mfc cause strange errors in debug only Pin
Cedric Moonen18-Jul-06 7:03
Cedric Moonen18-Jul-06 7:03 

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.