Author Topic: C programming  (Read 6785 times)

Offline myimran

  • Single posting newcomer
  • *
  • Posts: 2
C programming
« on: April 19, 2012, 01:49:37 pm »
Hello! I am new to C programming, am using a book, "C for dummies" I am using codes in the book for learning C, here is my code and ERRORS or problem. Please help me out.

#include <stdio.h>
#include <conio.h>
#include <dos.h>
void dropbomb(void);
main()
{
printf("press any key to drop bomb:");
getch();
dropbomb();
printf("\nboooomb\n");
}
void dropbomb()
{
    int x;
    for(x=880;x>440;x-=10)
{
    sound(x);
    delay(100);
}
    nosound();
}
and here are the errors:

undefined  reference to 'sound'
undefined reference to 'delay'
undefined reference to 'nosound'
Thank you all you!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C programming
« Reply #1 on: April 19, 2012, 01:52:55 pm »
Rules, anyone?

p.s. buy a better book, this one seems pretty outdated, because the dos days are well in the past
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline myimran

  • Single posting newcomer
  • *
  • Posts: 2
Re: C programming
« Reply #2 on: April 19, 2012, 01:58:13 pm »
Rules, anyone?

p.s. buy a better book, this one seems pretty outdated, because the dos days are well in the past

would you please suggest a better book, Name please?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C programming
« Reply #3 on: April 19, 2012, 02:22:52 pm »
No, I'm C++ guy, I'm learning C from the internet.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

zabzonk

  • Guest
Re: C programming
« Reply #4 on: April 19, 2012, 04:28:41 pm »
You should post this somewhere like  http://www.reddit.com/r/learnprogramming - and a better book is indeed required, such as http://en.wikipedia.org/wiki/The_C_Programming_Language

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: C programming
« Reply #5 on: April 19, 2012, 10:42:27 pm »
Please respect our forum rules (you have accepted them with registering here) and do not post questions unrelated to C::B.

Topic locked !