|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Alrighty, I borrowed a C programming book from my cousin to help me get into programming, and I downloaded a bloodshed compiler.
Ok, I typed out this simple function: #include <stdio.h> main () { printf("hello, world/n"); } compile it, save it as a C source file on desktop. I click on the desktop icon I just created to get my output, but the window with the output only pops up for like a millisecond! I need to it stay up, so I can move on the more advanced things where I might actually want to LOOK at my output. Make sense? I know, I'm completely new to this. I hope you can help me. |
| Sponsored Links |
|
|
|
|||
|
try this:
-open a command prompt. -drag the desktop icon into it. -hit 'enter'. -The program will work It's doing exactly what you want. It's printing "hello, world", then exiting. Here's a bit of a picture guide of what I described. I used a perl file to do this, btw. ![]() ![]() ![]()
__________________
Programming is an art form. Everyone can program, but few can do it right. Last edited by suicidal pencil; 05-15-2008 at 04:24 PM. |
|
|||
|
__________________
Programming is an art form. Everyone can program, but few can do it right. |
| Sponsored Links |
|
|
|
|||||
|
Code:
#include <stdio.h>
#include <iostream>
using namespace std;
main ()
{
printf("hello, world/n");
cin.get();
}
__________________
Success is the ability to go from failure to failure without losing your enthusiasm. ~ Winston Churchill |
|
|||
|
Personally, I dont like mixing languages, especially I/O functions. And further working on this code can cause strange behavior when mixing cin with scanf or cout with printf. But its my subjective opinion :P
|
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Total Newbie to C# - Hope ye can help! | grungefreak1 | Introductions | 3 | 11-26-2007 07:21 AM |
| 2D Array newb | The Midnighter | Java Help | 3 | 11-06-2007 09:56 PM |
| I am a total Newb... | BadMrPat | General Programming | 5 | 05-01-2007 12:06 PM |
| Help a Newb Learn it.. | Mushroomer | Visual Basic Programming | 1 | 03-28-2007 05:30 PM |
| total members visited today | Void | The Lounge | 3 | 07-15-2006 12:25 PM |