Calling a header

closed account (NUj6URfi)
I make a call to Orcs.h, and I put in dev-c++'s backward folder. It is a homemade header, and when I compile my program that includes and runs the header it says winmain@16 error like call to or something about id. I don't have the code on me so I can't give the exact answer. What can I do to fix this? I made sure the header and call was spelled right.
closed account (28poGNh0)
instead of using "dev-c++" I recommand you to use code::blocks it's free and a lot better,this is a link if you want to download it
http://www.codeblocks.org/downloads/26#linux

concerning headers I recommand that you put the file.cpp and the file2.h in the same directory

in the file2.h put those lines
1
2
3
4
5
6
7
8
9
10
11
# ifndef FILE_H
# define FILE_H

int maxFunc(int a,int b);

int maxFunc(int a,int b)
{
    return a>b?a:b;
}

# endif 


and in the file.cpp put

1
2
3
4
5
6
7
8
9
10
11
# include "file.h"

# include <iostream>
using namespace std;

int main()
{
    cout << maxFunc(5,3) << endl;
    
    return 0;
}


and I hope it works
closed account (NUj6URfi)
It didn't. It has worked before.
Because your include is this:

#include <SDL.h>

and it should be

#include "SDL.h"

I responded in your OTHER thread on the same question.
Topic archived. No new replies allowed.