Problem when creating a window
Hi all,
In the following link, there are codes of library files including
Window.h and
Simple_window.h as well.
http://www.stroustrup.com/Programming/Graphics/
Now when I write below code, there is no problem.
1 2 3 4 5 6 7
|
#include <Simple_window.h>
int main()
{
Simple_window w(Point(100,100), 600, 400, "test");
return 0;
}
|
But when I write this one (for using
Window rather than
Simple_window) I get errors:
1 2 3 4 5 6 7
|
#include <Window.h>
int main()
{
Window w(Point(100,100), 600, 400, "test");
return 0;
}
|
5 errors, two of them:
Error 1 error C2065: 'Window' : undeclared identifier c:\users\cs\documents\visual studio 2012\projects\test_3\test_3\test_3.cpp 5
Error 2 error C2146: syntax error : missing ';' before identifier 'w' c:\users\cs\documents\visual studio 2012\projects\test_3\test_3\test_3.cpp 5
I didn't find any case that prevents us from creating a
window compared to
simple_window.
Window is in the Graph_lib namespace.
1 2 3 4 5 6
|
#include <Window.h>
int main()
{
Graph_lib::Window w(Point(100, 100), 600, 400, "test");
}
|
Thank you very much.
Topic archived. No new replies allowed.