No such file or directory C programming tutorial 10

+1 Guyman Lam · April 12, 2015
/images/forum/upload/2015-04-12/fcb3ba9d2c610b7f070548efbe0a3987.png

Post a Reply

Replies

Oldest  Newest  Rating
0 Clark Alaan · April 12, 2015
Really have no idea what's wrong. It's probably a Code::Blocks oddity? I don't work with Code::Blocks that much. I can see that you have a folder under Sources called C Programming and your main.c is under that folder.

My guess would be that the scope of main is does not include the headers folder when you compile it. Try maybe putting your main under the Sources folder rather than the C Programming folder.

Hoping that that solves it. Sorry if I'm not much help.
0 c student · April 12, 2015
or:
#include "../../Headers/GuymanInfo.h"
0 Fayazur Rahman Summit · April 12, 2015
program like as bellow :




#include <stdio.h>
#include <stdlib.h>
#include "Summit's info.h"

int main()
{
    int girlsAge = (AGE / 2) + 7;
    printf("%s can date girls %d or older", MYNAME, girlsAge);

    return 0;
}


#define MYNAME "SUMMIT"
#define AGE 23




I think now you can understand how to create a header file .
  • 1

C

107,091 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator