Thread: Basics in Pelles C

  1. #1
    Banned
    Join Date
    Aug 2011
    Location
    Ghaziabad, India, India
    Posts
    48

    Question Basics in Pelles C

    Hi Folks . Why pelles c compiler creating warning and not running the following code
    Code:
    #include <stdio.h>
    #include<conio.h>
    int main(int argc, char *argv[])
    {
    	clrscr();
        printf("Hello, world!\n");
        return 0;
    }
    Please correct me.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What is the warning?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Look up the librarary functions you are using in the help file....

    Put your text cursor on the function name and press F1...

    Notice anything about your clrscr() call?

  4. #4
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Care to tell anybody what the warning/error is, and exactly how it's "not running the code". Perhaps you just need to keep the console open long enough to read it.

  5. #5
    Banned
    Join Date
    Aug 2011
    Location
    Ghaziabad, India, India
    Posts
    48
    Quote Originally Posted by laserlight View Post
    What is the warning?
    warning #2027: Missing prototype for 'clrscr'.

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by laserlight View Post
    What is the warning?
    In Pelles C ... non-C-99 standard functions are prefixed with an _ so it's _clrscr()...

    If a programmer insists upon crappy Turbo C code and he's too lazy to type an underscore, he needs to do the following sequence...

    Project -> Project Options -> Compiler -> Check "Define Compatibility Names" -> Ok

    Of course this is all explained in the help file...
    Last edited by CommonTater; 08-02-2011 at 11:20 AM.

  7. #7
    Banned
    Join Date
    Aug 2011
    Location
    Ghaziabad, India, India
    Posts
    48
    Quote Originally Posted by CommonTater View Post
    In Pelles C ... non-C-99 standard functions are prefixed with an _ so it's _clrscr()...

    If a programmer insists upon crappy Turbo C code and he's too lazy to type an underscore, he needs to do the following sequence...

    Project -> Project Options -> Compiler -> Check "Define Compatibility Names" -> Ok

    Of course this is all explained in the help file...
    Thanks Dear for _clrscr();

  8. #8
    Banned
    Join Date
    Aug 2011
    Location
    Ghaziabad, India, India
    Posts
    48
    Please Tell Me How can I run .obj file in pelles C Compiler. . .or How can I make .exe from this .obj file

  9. #9
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Yes Dear, thank you from both of us. *hugs and kisses*
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Vxyz View Post
    Thanks Dear for _clrscr();
    Do not call me "Dear"!

  11. #11
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Vxyz View Post
    Please Tell Me How can I run .obj file in pelles C Compiler. . .or How can I make .exe from this .obj file
    Create a project... don't just start typing code...

    Once again ... Read The Help File!

  12. #12
    Banned
    Join Date
    Aug 2011
    Location
    Ghaziabad, India, India
    Posts
    48
    Quote Originally Posted by CommonTater View Post
    Do not call me "Dear"!
    What is the Problem to call you "DEAR" you are really a good Person.

  13. #13
    Registered User
    Join Date
    Oct 2006
    Posts
    250
    Oh dear!
    iMalc: Your compiler doesn't accept misspellings and bad syntax, so why should we?
    justin777: I have no idea what you are talking about sorry, I use a laptop and there is no ascii eject or something

  14. #14
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Vxyz View Post
    What is the Problem to call you "DEAR" you are really a good Person.
    My wife and I both find it far too personal for someone you've only ever spoken to online.

    Just don't do it.

  15. #15
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Quote Originally Posted by CommonTater View Post
    My wife and I both find it far too personal for someone you've only ever spoken to online.

    Just don't do it.
    Ok, dude......
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling C++ on Pelles C....
    By CommonTater in forum C++ Programming
    Replies: 2
    Last Post: 05-27-2011, 07:56 PM
  2. how to write programs in pelles c??
    By Abhas in forum C Programming
    Replies: 13
    Last Post: 04-11-2011, 12:32 AM
  3. Pelles C Temperature
    By uneasybbj in forum C Programming
    Replies: 4
    Last Post: 11-23-2010, 01:51 PM
  4. help debugging in Pelles C IDE
    By gaurav9991 in forum C Programming
    Replies: 3
    Last Post: 10-30-2010, 07:15 AM
  5. Opinion on C99 ver. of Pelles C IDE?
    By Adak in forum C Programming
    Replies: 0
    Last Post: 03-13-2009, 07:27 PM