Thread: code fail to compile in mvs but run in codeblock

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    48

    code fail to compile in mvs but run in codeblock

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    int main (void)
    
    {
      FILE* spData;
     if((spData = fopen("HR.text", "r")) == NULL)
     {
    	 printf(" Error openning file!");
    	 exit(100);
     }
      return 0;
    }
    i tried to run this code from the book but it only run in codeblock, it fail at debugging in mvs

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    So look at the debugger and see why.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CodeBlock
    By sandyrockzs in forum C++ Programming
    Replies: 2
    Last Post: 09-21-2011, 08:26 AM
  2. fail to count digit of an integer (fail at 9)
    By azsquall in forum C++ Programming
    Replies: 3
    Last Post: 05-02-2008, 09:42 AM
  3. Why does this code fail?
    By Yasir_Malik in forum C Programming
    Replies: 12
    Last Post: 07-26-2007, 10:51 AM
  4. compiling on codeblock
    By h_howee in forum C++ Programming
    Replies: 11
    Last Post: 12-24-2005, 02:55 PM
  5. Replies: 3
    Last Post: 03-07-2003, 09:06 PM