Test Mushroom
Posts: 10,045
Threads: 1,506
Joined: 2008-06
Gender: Male
Sexual Orientation: Straight
Country Flag: usa
IGN: GuavaCowboy
Server: Zenith
Level: 10x
Job: Jett
Guild: L>
I'm not a C++ programmer, but I can guess.
c_str is your friend.
The traditional C++ string is a Pascal string in that it has no null terminator. If you want the null terminator, you have to call the c_str method.
Posting Freak
Posts: 4,302
Threads: 256
Joined: 2008-07
Gender: Male
Level: 251
"<<" should be able to output a string to a file. What type is Output->Text?
Test Mushroom
Posts: 10,045
Threads: 1,506
Joined: 2008-06
Gender: Male
Sexual Orientation: Straight
Country Flag: usa
IGN: GuavaCowboy
Server: Zenith
Level: 10x
Job: Jett
Guild: L>
Post everything from the method, please.
Posting Freak
Posts: 950
Threads: 65
Joined: 2009-05
Gender: Transgender - F2M
Sexual Orientation: Bi
Country Flag: israel
IGN: ....|_|0|_|
Server: |_|_|0|
Job: .....|0|0|0|
What Spaz means is that you can use all the .NET classes from MC++ just like you used to do in C#. So instead of ofstream which is the C++ unmanaged stream, you can use FileStream. Basically you can copy any C# code and make it MC++ with a few syntactical changes.
Unless you are doing it because that's what university\school\college told you that you should do, I would generally NOT recommend making managed applications in C++. Making C++ managed is ultimately destroying the whole point of the language, and you are rather off coding C# because it is much simpler. I know you are using managed C++ because the unmanaged version has no text boxes.
Posting Freak
Posts: 1,327
Threads: 76
Joined: 2010-08
Gender: Male
Sexual Orientation: Straight
Country Flag: north korea
IGN: ° ͜ʖ °
Server: DEGZA
Level: T_T
Job: This is FParta!
Guild: I like toast
Guild Alliance: @__________________@
Blast the difficulties of C++. I'm loving ColdFusion atm.