Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 07-08-05   #11 (permalink)
Overclocker
 
Join Date: Dec 2004
Posts: 401

Rep: 65 Melraidin is acknowledged by some
Unique Rep: 48
FAQs Submitted: 4
Folding Team Rank: 264
Trader Rating: 1
Default

Quote:
Originally Posted by kris_cs1
Arrrggghhh! lol.
Thanks, that works except now because it is a string, it won't open.

Code:
infile.open(File1);
It says:

[/size][/size]

every time i can't do it
i'm so embarrased


string.c_str () returns a C style (null terminated char array) string.

Hence;

infile.open(File1.c_str ());
Melraidin is offline I fold for Overclock.net   Reply With Quote
Old 07-08-05   #12 (permalink)
PC Gamer
 
kris_cs1's Avatar
 
amd ati

Join Date: Apr 2005
Location: Chester, Cheshire
Posts: 218

Rep: 27 kris_cs1 is acknowledged by some
Unique Rep: 24
FAQs Submitted: 1
Trader Rating: 0
Default

Quote:
Originally Posted by Melraidin
string.c_str () returns a C style (null terminated char array) string.

Hence;

infile.open(File1.c_str ());
Hey cool, where did you learn all this stuff?

Now just to store the whole file in a variable.
__________________
Kris



System: My System
CPU
AMD Sempron 2800+
Motherboard
ASUS A7N8X-VM
Sound Card
5.1 SURROUND SOUND
Power Supply
350W
Case
Black
OS
Windows XP Home SP2
Monitor
19"
kris_cs1 is offline   Reply With Quote
Old 07-08-05   #13 (permalink)
Programmer
 
MrSmiley's Avatar
 
amd nvidia

Join Date: Oct 2004
Location: Manhattan, Kansas
Posts: 1,060

Rep: 72 MrSmiley is acknowledged by some
Unique Rep: 57
FAQs Submitted: 1
Folding Team Rank: 817
Hardware Reviews: 1
Trader Rating: 0
Default

Quote:
Originally Posted by kris_cs1
Hey cool, where did you learn all this stuff?

Now just to store the whole file in a variable.
I would assume he learned via the "INTERNETS" or "School". These are low-level concepts.
__________________
System: My System
CPU
Intel 2.8GHz
Motherboard
ESG smth
Power Supply
Antec TruePower 350Watt
OS
FreeBSD
MrSmiley is offline I fold for Overclock.net   Reply With Quote
Old 07-08-05   #14 (permalink)
Overclocker
 
Join Date: Dec 2004
Posts: 401

Rep: 65 Melraidin is acknowledged by some
Unique Rep: 48
FAQs Submitted: 4
Folding Team Rank: 264
Trader Rating: 1
Default

Quote:
Originally Posted by kris_cs1
Hey cool, where did you learn all this stuff?

Now just to store the whole file in a variable.
Years of working with C++, but forgotten the intricacies of its syntax since moving to C#.

Look around here for more http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm

If you're getting seriously into C++ try getting a hold of Stroustrup's "The C++ Programming Language". Excellent explanations of why things are the way they are. You should be able to find it in your local library.

Bjarne Stroustrup's homepage
Melraidin is offline I fold for Overclock.net   Reply With Quote
Old 07-11-05   #15 (permalink)
PC Gamer
 
kris_cs1's Avatar
 
amd ati

Join Date: Apr 2005
Location: Chester, Cheshire
Posts: 218

Rep: 27 kris_cs1 is acknowledged by some
Unique Rep: 24
FAQs Submitted: 1
Trader Rating: 0
Default

Quote:
Originally Posted by Melraidin
Years of working with C++, but forgotten the intricacies of its syntax since moving to C#.

Look around here for more http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm

If you're getting seriously into C++ try getting a hold of Stroustrup's "The C++ Programming Language". Excellent explanations of why things are the way they are. You should be able to find it in your local library.

Bjarne Stroustrup's homepage
Ok thanks, I will try and check that out. I would love to get into C++ but it's just a case of finding the best learning methods and resources for me . Next time I go to the library I check if they have it.
__________________
Kris



System: My System
CPU
AMD Sempron 2800+
Motherboard
ASUS A7N8X-VM
Sound Card
5.1 SURROUND SOUND
Power Supply
350W
Case
Black
OS
Windows XP Home SP2
Monitor
19"
kris_cs1 is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 02:59 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.29902 seconds with 8 queries