News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Help needed >.<

Started by XGenesisX, February 27, 2009, 12:59:51 PM

Previous topic - Next topic

XGenesisX

i am learning C++ language now and doing console application using codeblock
i just want to ask if there is any way to access the data that are stored outside of the codeblock program.
For example,i do not want to key in the input inside the console window. i wan to access the data that is stored outside codeblock when i type in the command.(For example,i wan to access the data in ggg.txt)
is it possible to do it with codeblock?

ollydbg

QuoteFor example,i do not want to key in the input inside the console window. i wan to access it when i type in the command.
Welcome  to the forum.
Sorry I can't follow your mind. More specific please.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

thomas

If you want to access data in a file such as ggg.txt, then you need to open that file and read from it. This has nothing to do with Code::Blocks, and we won't teach you how to do that, since it's basics of programming, not Code::Blocks.

You need to learn how to use either the C++ iostream functions or the C stdio functions (which I personally perceive easier). Searching the internet for either of those terms will lead you to the documentation.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."