-
Senior Member
OpenGL Guru
custom routines and MSC++
I have been getting back into programming after of being out of it for a few year's.
I want to seperate my routines into diffrent .cpp files and use my own .h files.
I am using the code from nehe site to setup the window and opengl setup code.
The problem I am having is passing a structure from my routine.
//mystuff.h
struct XYZ_BUFFER
{
float x;
float y;
float z;
int dir_x;
int dir_y;
int dir_z;
};
// end .h
// mystuff.c
#include "mystuff.h" //defines my structure.
XYZ_BUFFER Check_boundary( XYZ_BUFFER bc )
{
// check location of object
// change direction if needed
// code not shown but works when in main program.
return( bc )
}
What is the proper way to access from another my main.c program.
It works when I have it all in one file....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules