Click here to Skip to main content
15,886,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what kind of search is recommended??? Pin
pblais3-Oct-07 8:50
pblais3-Oct-07 8:50 
QuestionSorry if wrong location. Trying to open unknown video type for processing. Pin
Code Monkey Mike24-Sep-07 10:41
Code Monkey Mike24-Sep-07 10:41 
QuestionCtrl Shift F9 will clear all breakpoints in VC 6.0 , however Pin
Vaclav_24-Sep-07 6:00
Vaclav_24-Sep-07 6:00 
AnswerRe: Ctrl Shift F9 will clear all breakpoints in VC 6.0 , however Pin
Maximilien24-Sep-07 7:21
Maximilien24-Sep-07 7:21 
QuestionCRectTracker static linking Pin
bob1697224-Sep-07 5:58
bob1697224-Sep-07 5:58 
AnswerRe: CRectTracker static linking Pin
Mark Salsbery24-Sep-07 6:36
Mark Salsbery24-Sep-07 6:36 
GeneralRe: CRectTracker static linking Pin
bob1697224-Sep-07 7:31
bob1697224-Sep-07 7:31 
Questiongraphics in c++ console program Pin
Sai Yasodharan24-Sep-07 5:58
Sai Yasodharan24-Sep-07 5:58 
hi,

i tried to execute the following program(which was given in turbo c++ documentation) in vc++. but it gives an error, that graphics.h can't be found.

so i copied that graphics.h from turbo c to the vc++'s include folder. now it is showing many errors, which i can't resolve(i even don't understand these errors). i am studying c++ in my college. our syllabus include everything from file handling to all oops concepts. but graphics is not covered in out syllabus. so i decided to learn it on my own. but don't know how to start

someone help me please


the following code works perfectly in turbo c, but not in vc++
<br />
#include <graphics.h><br />
#include <stdlib.h><br />
#include <stdio.h><br />
#include <conio.h><br />
<br />
int main(void)<br />
{<br />
   /* request auto detection */<br />
   int gdriver = DETECT, gmode, errorcode;<br />
   int xmax, ymax;<br />
<br />
   /* initialize graphics and local variables */<br />
   initgraph(&gdriver, &gmode, "");<br />
<br />
   /* read result of initialization */<br />
   errorcode = graphresult();<br />
   /* an error occurred */<br />
   if (errorcode != grOk)<br />
   {<br />
      printf("Graphics error: %s\n", grapherrormsg(errorcode));<br />
      printf("Press any key to halt:");<br />
      getch();<br />
      exit(1);<br />
   }<br />
<br />
   setcolor(getmaxcolor());<br />
   xmax = getmaxx();<br />
   ymax = getmaxy();<br />
<br />
   /* draw a diagonal line */<br />
   line(0, 0, xmax, ymax);<br />
<br />
   /* clean up */<br />
   getch();<br />
   closegraph();<br />
   return 0;<br />
}<br />


Known is a Drop, UnKnown is an Ocean
More about me at http://in.geocities.com/slagio2002/me.html

AnswerRe: graphics in c++ console program Pin
bob1697224-Sep-07 6:06
bob1697224-Sep-07 6:06 
GeneralRe: graphics in c++ console program Pin
Matthew Faithfull24-Sep-07 6:14
Matthew Faithfull24-Sep-07 6:14 
AnswerRe: graphics in c++ console program Pin
El Corazon24-Sep-07 8:19
El Corazon24-Sep-07 8:19 
Questionread array of file names with CString array ? Pin
mrby12324-Sep-07 5:54
mrby12324-Sep-07 5:54 
AnswerRe: read array of file names with CString array ? Pin
Chris Losinger24-Sep-07 6:02
professionalChris Losinger24-Sep-07 6:02 
GeneralRe: read array of file names with CString array ? [modified] Pin
mrby12324-Sep-07 6:06
mrby12324-Sep-07 6:06 
GeneralRe: read array of file names with CString array ? Pin
Chris Losinger24-Sep-07 6:15
professionalChris Losinger24-Sep-07 6:15 
GeneralRe: read array of file names with CString array ? Pin
Vaclav_24-Sep-07 6:09
Vaclav_24-Sep-07 6:09 
GeneralRe: read array of file names with CString array ? Pin
Chris Losinger24-Sep-07 6:14
professionalChris Losinger24-Sep-07 6:14 
QuestionRe: read array of file names with CString array ? Pin
David Crow24-Sep-07 6:17
David Crow24-Sep-07 6:17 
AnswerRe: read array of file names with CString array ? Pin
mrby12324-Sep-07 6:24
mrby12324-Sep-07 6:24 
QuestionRe: read array of file names with CString array ? Pin
David Crow24-Sep-07 6:38
David Crow24-Sep-07 6:38 
AnswerRe: read array of file names with CString array ? Pin
mrby12324-Sep-07 6:47
mrby12324-Sep-07 6:47 
QuestionRe: read array of file names with CString array ? Pin
David Crow24-Sep-07 6:57
David Crow24-Sep-07 6:57 
AnswerRe: read array of file names with CString array ? Pin
Vaclav_24-Sep-07 6:07
Vaclav_24-Sep-07 6:07 
QuestionRe: read array of file names with CString array ? Pin
David Crow24-Sep-07 6:14
David Crow24-Sep-07 6:14 
AnswerRe: read array of file names with CString array ? Pin
mrby12324-Sep-07 6:41
mrby12324-Sep-07 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.