Created
April 8, 2010 00:52
-
-
Save zachelko/359642 to your computer and use it in GitHub Desktop.
Test case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//utils.h | |
#ifndef UTILS_H | |
#define UTILS_H | |
#include | |
struct Point2d | |
{ | |
float x; | |
float y; | |
void print() | |
{ | |
std::cerr << x << "," << y << std::endl; | |
} | |
}; | |
void utilsFoo() | |
{ | |
int x = 2; | |
} | |
#endif | |
//foo.h | |
#include "utils.h" | |
#ifndef FOO_H | |
#define FOO_H | |
struct Foo | |
{ | |
int x; | |
int y; | |
}; | |
void foo(Point2d); | |
#endif | |
//foo.cpp | |
#include "utils.h" | |
#include "foo.h" | |
void foo(Point2d point) | |
{ | |
int x = 4; | |
point.x = 5; | |
} | |
//main.cpp | |
#include "utils.h" | |
#include "foo.h" | |
int main() | |
{ | |
Foo foo = {1, 1}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment