| | |
Graphics Program Help
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Solved Threads: 0
Just for notes, I'm using VisualStudio 2003.
I'm working on a program that's supposed to make the Muller-Lyer illusion. I've got all of the coding done, but now when I try to run it all I get is a load of errors. First, it starts to compile the program and pops up a box saying, "There were build errors. Continue?" I hit continue anyways, and then it says "Unable to start debugging. Unable to start program "[Blah blah]." The system cannot find the file specified. On top of that, once I close that window, down in the task list window it gives a list of 'error LNK2019: unresolved external symbol' things. I'm really new to C++ and I have no clue of what to do. I'm not asking for a handout, I just need to know what I'm doing wrong. Thanks in advance!
I'm working on a program that's supposed to make the Muller-Lyer illusion. I've got all of the coding done, but now when I try to run it all I get is a load of errors. First, it starts to compile the program and pops up a box saying, "There were build errors. Continue?" I hit continue anyways, and then it says "Unable to start debugging. Unable to start program "[Blah blah]." The system cannot find the file specified. On top of that, once I close that window, down in the task list window it gives a list of 'error LNK2019: unresolved external symbol' things. I'm really new to C++ and I have no clue of what to do. I'm not asking for a handout, I just need to know what I'm doing wrong. Thanks in advance!
C++ Syntax (Toggle Plain Text)
// Program file: mullyer.cpp // Displays the image that causes the Muller-Lyer illusion #include "C:\Graphics\graphics.h" int main() { initGraph(); return 0; } void renderScene() { // Draw the two-headed arrow moveTo(30, 30); lineTo(180, 30); moveTo(30, 30); lineTo(60, 0); moveTo(30, 30); lineTo(60, 60); moveTo(180, 30); lineTo(150, 0); moveTo(180, 30); lineTo(150, 60); // Draw the two-tailed arrow moveTo(30, 100); lineTo(180, 100); moveTo(30, 100); lineTo(0, 70); moveTo(30, 100); lineTo(0, 130); moveTo(180, 100); lineTo(210, 70); moveTo(180, 100); lineTo(210, 130); // Label the drawing outText(0, 250, "The Muller-Lyer illusion"); }
Well most of us aren't mind readers here so provide some errors for us to look at.
>> #include "C:\Graphics\graphics.h"
replace \ with \\
Might/mightn't solve some of your problems.
>> #include "C:\Graphics\graphics.h"
replace \ with \\
Might/mightn't solve some of your problems.
Last edited by twomers; Oct 8th, 2007 at 4:07 pm.
Well the short answer to the problem is that you're trying to use a graphics API for a long-dead DOS compiler, and you're using something rather more up to date.
What you do about it is rather more complicated however. For a start, there are many more graphic API's available to you.
API's like DirectX and OpenGL are highly featured, but take quite a lot of getting used to. At the other end of the scale, you can use simple Win32 GDI commands to draw simple 2D scenes like the one you're trying to draw.
Somewhere in the middle are things like LibSDL and allegro
What you do about it is rather more complicated however. For a start, there are many more graphic API's available to you.
API's like DirectX and OpenGL are highly featured, but take quite a lot of getting used to. At the other end of the scale, you can use simple Win32 GDI commands to draw simple 2D scenes like the one you're trying to draw.
Somewhere in the middle are things like LibSDL and allegro
Let me guess: Your using visual c++ 6 and some subpar textbook that uses outdated headers. The class is taught by some loser who is too stupid to get a real job actually programming. In fact judging by the time of year, you are on Chapter 2 which is titled "Graphics" or something of the sort. My advice: get a real c++ book, one that wasn't published in 1992. Don't expect to get anything out of this class.
"Hey ass, don't hijack my thread. This is serious." -JoshSCH
![]() |
Similar Threads
- Graphics program in c language (C)
- my program given some erroe (computer graphics) (C)
- need a good graphics program (Graphics and Multimedia)
- graphics.h supplement? (C++)
Other Threads in the C++ Forum
- Previous Thread: Functions stored in structure
- Next Thread: about linked list
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph homeworkhelp iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting spoonfeeding string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






