Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 14th, 2006, 6:15 PM   #1
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
never programmed before

hi.. i want to learn to program but i'm having problems finding a tut on C... i'm running on windows and am using the devc++ compiler thingy... any help?

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old May 14th, 2006, 6:32 PM   #2
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 770
Rep Power: 3 Jimbo is on a distinguished road
Did you look through the C/C++ Tutorial Forum?
Jimbo is offline   Reply With Quote
Old May 14th, 2006, 6:36 PM   #3
Software_geek
Newbie
 
Software_geek's Avatar
 
Join Date: May 2006
Posts: 10
Rep Power: 0 Software_geek is on a distinguished road
Try www.w3schools.com, www.cprogramming.com/tutorial.html, or www.learnvisualstudio.net (although this one requires you to pay a little fee).

Hope they help, they've helped me.
__________________
CHAV = Council House And Violent
Software_geek is offline   Reply With Quote
Old May 14th, 2006, 6:59 PM   #4
kp4621
Newbie
 
kp4621's Avatar
 
Join Date: May 2006
Posts: 12
Rep Power: 0 kp4621 is on a distinguished road
Send a message via Yahoo to kp4621
kp4621@gmail.com

Or you could go to your local library and pick up a book. I recomend searching the net before you do that, The reason for searching the net is so you can get a basic understanding instead of just reading a book and being confused.
kp4621 is offline   Reply With Quote
Old May 14th, 2006, 7:32 PM   #5
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 4 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
Or, even better, if you look in the Dev-C++ help program you will see a small but complete tutorial on C! But do take a look at other tutorials as well.
__________________
The world's first athletic computer geek!
The home of PrProgramsStudios
How not to post a question: <-- Please don't reply
Prm753 is offline   Reply With Quote
Old May 14th, 2006, 7:40 PM   #6
kp4621
Newbie
 
kp4621's Avatar
 
Join Date: May 2006
Posts: 12
Rep Power: 0 kp4621 is on a distinguished road
Send a message via Yahoo to kp4621
kp4621@gmail.com

Very true, I use Dev-C++ everyday and it makes my job easier with a built in compilier and everything right there.
__________________
Help me out and get rewards , K.O. Hosting


#include <iostream>

using namespace std;

int main()
{
   int name;

   cout << "Please enter your name: " << endl;
   cin >> name;
   cout << "Hello " << name << " Please go jump off a cliff !!" << endl;

return 0;
}
kp4621 is offline   Reply With Quote
Old May 15th, 2006, 12:56 AM   #7
pastalover
Newbie
 
Join Date: May 2006
Posts: 11
Rep Power: 0 pastalover is on a distinguished road
remember!!when you want to save the code u must end with .c

for example , myprogramme.c
pastalover is offline   Reply With Quote
Old May 15th, 2006, 1:50 AM   #8
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
^
|

yeah...and use semicolons... ???

www.programmingtutorials.com

has lists of decent tuts.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old May 20th, 2006, 8:53 AM   #9
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
hi, thnx for all the good sites and stuff... went down to the library to borrow a c for dummies book, it's really working, but having a problem, which i did solve in a way, but was wondering if there is something i'm doing wrong... the problem is the following, if i want to make a program say something like this

#include <stdio.h>

int main()
{
      printf("watch out for that car");
      printf("what c.......");
      
      return(0);
}

if i do that then when i compile it and start the *.exe file then it will just appear for like a nano second... and end... so i have read some stuff on this forum and found out that i could add a getchar(); so that the program is waiting for "input" is there no other way and why is almost every tutorial then they don't say this....

any good answers on this? am i doing something wrong? is there something wrong with my compiler or something since the tutorial people seem to leave this out? by the way i'm using dev++

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old May 20th, 2006, 8:58 AM   #10
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
This is one of the most commonly asked questions in the world. Programs run until they finish, then exit. If you start it in a console window, the console window is yours, the program closes, but its output remains in YOUR window. If it is given its OWN window by the OS (say you double click it, in Windows), it turns the window in when it's through. The key here is "DONE, FINISHED". You can control that by asking for operator input at the very end. That way, it's not "done" until someone provides input (like the ENTER key). That gives you a chance to see your stuff.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:52 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC