[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] c++ & mem
On Thu, Dec 07, 2000 at 01:35:59PM -0000, Ian Porter wrote:
> 1). when I compile a c++ file e.g.
> #include <stdio.h>
>
> int main ()
> {
> printf("hi there/n");
> return 0;
> }
Ugh! I thought that the only reason people bothered with C++
was: new, del and iostreams.h!!!
> by the command line
> g++ test.cpp
>
> it creates a file "a.out" but when I type it in on the command line it does not work, just comes back with a "bash" line.
the current directory has to be in your path for this to work.
Since this is not a very good idea, you have to provide a path to the
executable. Typing ./a.out would run it.
You know you can specify an output for your file, don't you?
g++ -o test test.cpp
produces an exec called test
> 2). Also I have 128Mbytes of RAM, but where do you tell Linux that I have this memory, since it says that it is 65Mbytes?
I thought that this was catered for automatically. Have a look
at <http://www.linuxdoc.org/HOWTO/Hardware-HOWTO-5.html>
Regards,
José
--
José L Gómez Dans PhD student
Tel: +44 114 222 5582 Radar & Communications Group
FAX; +44 870 132 2990 Department of Electronic Engineering
University of Sheffield UK
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.