Hello all, header files seemed pretty simple when i first learned about them. until i actually tried to use my own.
The program that i am attempting to create should simply add 1 to 24, but it is using a function found in a header file as a test.
The problem is that i get no errors, but the addition does not happen. This is confusing me quite a bit, and it may be the fact that it's 10 to one in the morning, but i just can't figure it out.
Here is the header file (count.h):
int count (int x) {
x = x + 1;
return x;
}
and the main file:
int main () {
#include <iostream>
#include "count.h"
using namespace std;
int num;
num = 24;
cout << num << endl;
count (num);
cout << num << endl;
cin.get();
}