thanks for the help <huges>
thanks for the help <huges>
Last edited by eric123; 07-28-2006 at 02:25 AM.
Um, if you can write:
cin>> text;
What's so difficult about writing:
a_file<<text;
The text would be limited to some integer though.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
becomesCode:a_file<<"hello =) ";
Code:a_file << text;
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
if i do it like that then i cant enter stuff to the file from the exe which is what i whant to do
and what will i have learn? so i like to not do it that way
Originally Posted by Mario F.
not shore what u mean by this please say more
Really? Have you even tried it?Originally Posted by eric123
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
What is there left to say? Laserlight and I provided you with the same solution. replace your code as explained.Originally Posted by eric123
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
lol didnt read it right and no iv never tried it
so i tri it and whin i open the txt i get the same number every time no matter what i right
4198592??? any ideal what that means lol or how i can make it right what i type
That variable text you are using to accept input and then ouput to a file is declared of type int. That is integer. It represents integral arithmetic types. What you want is text. you should declare it as a string.Originally Posted by eric123
add this below "#include <cstdio>"
and change int text; to string text;Code:#include <string>
And now that it is working, I suggest you start from the basics instead of already trying to create a file.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
ty it is work lol and what you mean by basic how long can some 1 learn how to right very esey stuff <ya i no this is not that hard to you> i can do some stuff file i/o is just someting to learn i learn more and get batter this is the first time iv ever gotsometing to work useing file i/o
ya i no i needed help but everthange i no i learn from reading and a little help here and ther
i got a big problum whit tring to do alot fast and work on c++ for liek 12 hours then i get burned out and wount mess whit it for a long time but it makes me happy so i keep buying books alot of whats in them i still cant do but i like it =)
so tell me what you mean by basic... i can do hello world esey rofl....
Well it meant something else before, but now means you probably should consider using punctuation when writing.Originally Posted by eric123
Anyways, start with the tutorials on this website. Go one by one in the order they are presented to you. It's hard to do file I/O if you can't even understand what is an int. You will feel much more rewarded if you do so. C++ just like everything else, requires a method of learning. The order of the tutorials on this website is one such method.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Originally Posted by Mario F.
lol just so you no whin i akset what to you mean i was looking at it like
a_file << "text";
not like
a_file << text;
>.< ya i no im a noob
i cant understand all of it and like i said some times i go long time whitout working on it iv read every tutorial on this website for c++ i dont even understand hafe of it reading is not as good as noing what it means i do my best and keep going cuse i like doing it and its not like i have people that cant help me whit it only get help whit stuff like very little so if i do get a little it helps alot and agine thanks for your help=)
I whole-heartedly loathe this kind of language... But hey, whatever makes you feel cool!
> thanks for the help <huges>
> Last edited by eric123 : Today at 09:25 AM.
Please don't edit out your question when you've got your answer.
It makes the rest of the thread look meaningless.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.