Closed Thread
Results 1 to 6 of 6

Thread: How could this "hello world" be wrong?

  1. #1
    spadez is offline Learning Programmer
    Join Date
    Feb 2009
    Posts
    38
    Rep Power
    0

    How could this "hello world" be wrong?

    I dont understand, im starting out learning C, ive just installed visual studio and im following a hello world tutorial:

    Im creating a win32 console application and my code is:

    Code:
    /* Author: Your name
       Date: yyyy/mm/dd
       Description:
       Writes the words "Hello World" on the screen */
     
    #include<stdio.h>
    #include "stdafx.h"
     
    int main()
    {
       printf("Hello World\n"); //prints "Hello World"
       return 0;
    }
    Yet when I try to compile it says:

    "Error spawning rc.exe"

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest

    Re: How could this "hello world" be wrong?

    Does the rc.exe file exist? The most common problem I see from this error is that executable isn't available.

  4. #3
    shadowhound is offline Learning Programmer
    Join Date
    Aug 2008
    Posts
    30
    Rep Power
    0

    Re: How could this "hello world" be wrong?

    okay visual C++ is a hard compiler to use and i thort i would start to learn C untill i was told to learn C++ since its better and more powerfull im using Dev C++ if i was you what i would do is download Dev C++ and start a new project *console app* and write the hello world like this

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
          cout <<"Hello World" << endl; // this displays Hello world
          system("PAUSE"); // got to add this to make console stay up in Dev C++
          
          return 0;
    }

  5. #4
    Tparker is offline Newbie
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Re: How could this "hello world" be wrong?

    I will use a GNU C compiler rather than windows visual C++ but of course it depends what application you are going to develop and what platform

  6. #5
    fread's Avatar
    fread is offline Programming God
    Join Date
    Nov 2008
    Location
    Caribbean
    Posts
    654
    Blog Entries
    1
    Rep Power
    16

    Re: How could this "hello world" be wrong?

    Or u can download the tiny c compiler (tcc) which does not have a gui but would compile any standard c program. If you like the idea of working with an ide you should probably go with shadowhound's idea and get dev c++ which is a c and c++ compiler. This compiler is easy to set up and fairly easy to use, especially for beginners like you and I.

  7. #6
    PythonPower's Avatar
    PythonPower is offline Programming Professional
    Join Date
    Feb 2009
    Posts
    228
    Rep Power
    13

    Re: How could this "hello world" be wrong?

    The GNU C Compiler's rise to fame is partly based on its standards compatibility. You can get it on Windows too if you want - it's not too hard if I remember.

    There are two methods:

    MinGW | Minimalist GNU for Windows
    DJGPP

    They are quite different, if I remember correctly, but they should both achieve what you need.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. "\r\n" are for some reason turned into "\r\n\r\n"; what's wrong?
    By RhetoricalRuvim in forum Ruby Programming
    Replies: 1
    Last Post: 08-06-2011, 05:55 PM
  2. Alex G. CSS "Sexy Buttons" - what about "submit on 'ENTER'" ?
    By shackrock in forum JavaScript and CSS
    Replies: 7
    Last Post: 12-05-2010, 04:57 PM
  3. Replies: 2
    Last Post: 11-01-2010, 11:52 PM
  4. Java:Tutorial - "Hello World"
    By John in forum Java Tutorials
    Replies: 20
    Last Post: 12-23-2008, 06:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts