Computing.Net > Forums > Programming > help with console app in C++

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

help with console app in C++

Reply to Message Icon

Name: lazzareth
Date: February 4, 2005 at 07:48:51 Pacific
OS: Win Xp sp2
CPU/Ram: 2400 / 512
Comment:

Hi, ive just coded that massive program in console using dev-C++ and now ive come accross quite a problem

im getting the console app to build a .reg file from diffrent varible inputs (eg. name)

anyways, the problem im facing is that when it builds, this:

newfile << "\n[HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\Flash\7\Registration]"

//'newfile' being ofstream newfile("StudioMX.reg");

bcause of the '\' inside the conmmand line.. the console application thinks its one of those \" or \n commands... and generates this error:

35 C:\Mason\VC2005\FlashMX2004-en\main.cpp:66 [Warning] unknown escape sequence '\S'

the resuling line looks like:

[HKEY_LOCAL_MACHINESOFTWAREMacromediaFlashRegistration]

does anyone know how to solve this problem??



Sponsored Link
Ads by Google

Response Number 1
Name: Fozzie
Date: February 4, 2005 at 17:40:46 Pacific
Reply:

If I'm correct, \ is always an escape when followed by a letter. Try using \\ instead. I believe that is how you tell the compiler that you want to use the character itself rather than an escape sequence.


0

Response Number 2
Name: BlueRaja
Date: February 4, 2005 at 22:42:01 Pacific
Reply:

Ya, you're right, Fozz

BlueRaja.admin@gmail.com


0

Response Number 3
Name: lazzareth
Date: February 5, 2005 at 01:53:30 Pacific
Reply:

Thanks so mutch, im going to go test it now


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Copying folders w/out ful... Path problem



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: help with console app in C++

need help with char pointers in C++ www.computing.net/answers/programming/need-help-with-char-pointers-in-c/12633.html

I need help with using files in C# www.computing.net/answers/programming/i-need-help-with-using-files-in-c/12561.html

prob with Linked list in C www.computing.net/answers/programming/prob-with-linked-list-in-c/481.html