User forums > Using Code::Blocks

C programming

(1/2) > >>

myimran:
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!

oBFusCATed:
Rules, anyone?

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

myimran:

--- Quote from: oBFusCATed 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

--- End quote ---

would you please suggest a better book, Name please?

oBFusCATed:
No, I'm C++ guy, I'm learning C from the internet.

zabzonk:
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

Navigation

[0] Message Index

[#] Next page

Go to full version