What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » C help! Please

Pages: (2): « First [ 1 ] 2 » Last »
C help! Please
Author: Message:
.Roy
Veteran Member
*****

Avatar

Posts: 1526
Reputation: 11
20 / Male / –
Joined: Aug 2004
O.P. C help! Please
#include <stdio.h>
#include <conio.h>
int main(void)
{
   
    printf("lol\n");
    delay(2000);
    printf("Why isnt this working?!");
   
}
   

whats wrong with this?

I think i missed an #include but i dont know which one :S. The delay seems to be the problem...
09-08-2006 10:46 AM
Profile PM Web Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: C help! Please
windows.h ?

i duno, that seems to be in every c code i see :D
09-08-2006 11:09 AM
Profile PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: C help! Please
problem with delay being no such function exists? ^o)

This post was edited on 09-08-2006 at 11:13 AM by Eljay.
09-08-2006 11:13 AM
Profile PM Find Quote Report
.Roy
Veteran Member
*****

Avatar

Posts: 1526
Reputation: 11
20 / Male / –
Joined: Aug 2004
O.P. RE: C help! Please
i remember when using turbo ++ delay did exist.
09-08-2006 11:31 AM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: C help! Please
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
   
    printf("lol\n");
    sleep(2000);
    printf("Why isnt this working?!");
   
}

That is, if sleep() is in stdlib.h.
[Image: spartaafk.png]
09-08-2006 12:00 PM
Profile PM Web Find Quote Report
.Roy
Veteran Member
*****

Avatar

Posts: 1526
Reputation: 11
20 / Male / –
Joined: Aug 2004
O.P. RE: C help! Please
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
   
    printf("lol\n");
    sleep(2000);
    printf("Why isnt this working?!");
   
}
   
Still not working :/ sleep isnt correct :/

edit: im useing dev-c++

since i cant get turbo c++ to install >.>

This post was edited on 09-08-2006 at 12:10 PM by .Roy.
09-08-2006 12:09 PM
Profile PM Web Find Quote Report
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
35 / Male / –
Joined: Jun 2004
RE: C help! Please
google says to either try includeing windows.h or unistd.h ;)
09-08-2006 12:48 PM
Profile PM Find Quote Report
.Roy
Veteran Member
*****

Avatar

Posts: 1526
Reputation: 11
20 / Male / –
Joined: Aug 2004
O.P. RE: C help! Please
>.> im using dev-C++ maybe it doesnt work with this i dont know ...

I need to get another program the one i use at school... fuck thanks anyways guys, nothing worked.
09-08-2006 01:01 PM
Profile PM Web Find Quote Report
Adeptus
Senior Member
****


Posts: 732
Reputation: 40
Joined: Oct 2005
RE: C help! Please
I think the function you are looking for is named Sleep() with a capital S in MinGW library, and declared in windows.h -- try this:

#include <stdio.h>
#include <windows.h>
int main(void)
{
   
    printf("lol\n");
    Sleep(2000);
    printf("Why isnt this working?!");
   
}

I don't see anything here that would require inclusion of conio.h, as you seem to like to do.
09-08-2006 01:20 PM
Profile E-Mail PM Find Quote Report
.Roy
Veteran Member
*****

Avatar

Posts: 1526
Reputation: 11
20 / Male / –
Joined: Aug 2004
O.P. RE: C help! Please
quote:
Originally posted by Adeptus
#include <stdio.h>
#include <windows.h>
int main(void)
{
 
    printf("lol\n");
    Sleep(2000);
    printf("Why isnt this working?!");
   
}
Thanks LOADS! :)!

Edit: And when i used turbo c ++ there was a command called gotoxy() where moves your pointer to the following coordinates, like gotoxy(5,30).

and its not working, maybe i should just use turbo c

This post was edited on 09-08-2006 at 01:58 PM by .Roy.
09-08-2006 01:55 PM
Profile PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On