I am new to the forum and C as a programming language.
I am a student in college in my second programming course this year (First was VB.NET)
I did read the sticky about homework and no worries I am not looking for someone to write my program just answer a question about how to do a particular function.
One of the programs I have to write for my first assignment (summer semester) is a simple trip calculator, Take in the price of fuel, the kilometers (we're in Canada) of your trip, calculate mileage based on liters/100Km and spit out the cost of the fuel for the trip. That part of the assignment is done I am working to make it a little more of a "real" program. I have included a loop and decisions based on input to prevent invalid output or crashes.
I should mention I am programming in/on Linux (fedora core 5) coding in the text editior and running and compiling programs in a terminal window.
What I want to do in my program is call the linux command clear to clear the terminal screen so only the current running program is shown. otherwise all the commands to change to the approprite directory, complie and run are in the screen when my program starts and it just looks messy.
My understanding is I need to call another include file other than stdio.h
does anyone know the include I need to call and maybe have some example code of using an operating system command.
one more quick question, I am compling with gcc using the command
gcc filename.c -o executeablename I read elsewhere that in order to compile with a second include I have to change my gcc arguments?
Thanks in advance for any assistance, and sorry for being long winded.