+ 1
Arrays
How do I compile an array using gnu ?
3 Respostas
+ 2
g++ your_file.cpp
Where your_file.cpp contains code doing something with an array.
+ 1
I recommend:
g++ code.cpp -Wall -o code && ./code
Where "code" is the program name. It will compile and run like an IDE then. To automate this you could save this script:
#! /bin/sh
g++ $1 -Wall -o $(echo $1 | sed 's/.cpp//') && ./$(echo $1 | sed 's/.cpp//')
Save that as say "compile", then do "chmod +x compile". Now you can type:
./compile file.cpp to compile and run the file.
PS: I know the script was a little messy \_O_/