Pelles C forum

C language => Beginner questions => Topic started by: jerzee on August 05, 2010, 09:52:33 PM

Title: help
Post by: jerzee on August 05, 2010, 09:52:33 PM
any good c programming books
Title: Re: help with blackjack project
Post by: AlexN on August 06, 2010, 07:54:16 AM
Quote from: jerzee on August 05, 2010, 09:52:33 PM
C:\Users\jason\Documents\Pelles C Projects\loop\loop.c(1): fatal error #1035: Can't find include file "randomcard.h". does any one know what this means and how do i fix it he is the code

#include "randomcard.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
It means, what the message says, the compiler can't find the include file "randomcard.h". The compiler searches for this file in the directory where your source code is.
Have you create a header file "randomcard.h"?
Title: Re: help with blackjack project
Post by: AlexN on August 06, 2010, 06:56:29 PM
Quote from: jerzee on August 06, 2010, 03:56:10 PM
how do i create a header file for randomcard.h?
You need to write the function randomcard(), which you use in your source code and the prototype should be in randomcard.h.
Title: Re: help with blackjack project
Post by: Vortex on August 06, 2010, 07:07:57 PM
Hi jerzee,

Just check the include files of Pelles C to learn how to write header files.
Title: Re: help with blackjack project
Post by: TimoVJL on August 06, 2010, 08:43:03 PM
Quotein c pelles i cant find randoncard.h in the library
You can't. It isn't Pelles C header file. You have to write your own.
Create new file and save it as randomcard.h .
Title: Re: help with blackjack project
Post by: AlexN on August 08, 2010, 10:23:11 AM
Quote from: jerzee on August 06, 2010, 08:16:46 PM
in c pelles i cant find randoncard.h in the library and i dont know how to add it or even come close to adding it

I assume that the program is not yours. So look for the content of randomcard.h and the function randomcard() at the same source where you found the rest.