Graphics and color in C++ (or C)... 
Author Message
 Graphics and color in C++ (or C)...

As you may have guessed from my previous posts, I am a QuickBASIC
programmer porting to C++.....   In QuickBASIC, there were set
instructions for graphics and color, such as LINE, CIRCLE, COLOR, PSET,
GET/PUT, and so on...  Are there any equivalents in the C++ or C
language....  Or does anyone know of any header files that are used to
generate these kinds of tasks....

Thanks,
Trevor...



Sat, 09 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

Quote:
>As you may have guessed from my previous posts, I am a QuickBASIC
>programmer porting to C++.....   In QuickBASIC, there were set
>instructions for graphics and color, such as LINE, CIRCLE, COLOR, PSET,
>GET/PUT, and so on...  Are there any equivalents in the C++ or C
>language....  Or does anyone know of any header files that are used to
>generate these kinds of tasks....

This question is asked fairly frequently, hence its inclusion in the
comp.lang.c FAQ (and possibly the comp.lang.c++ FAQ, but I'm not
sure).  You might like to look at section 19, specifically questions
19.4 and 19.10.

HTH, HAND.

--
Chris Mears
ICQ: 36697123
C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html



Sat, 09 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

on comp.lang.c:
: As you may have guessed from my previous posts, I am a QuickBASIC
: programmer porting to C++.....   In QuickBASIC, there were set
: instructions for graphics and color, such as LINE, CIRCLE, COLOR, PSET,
: GET/PUT, and so on...  Are there any equivalents in the C++ or C
: language....  Or does anyone know of any header files that are used to
: generate these kinds of tasks....

There are no equivalents in the *standard* C++ or C language. This is
because each system implements them differently. If you want to use
QuickBASIC-style graphics/colour functions, you have to use your own
system's specific functions.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #80 D+ ADA N+++ |
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/

"Products like that make me wish I could menstruate."
   - Andy Richter



Sat, 09 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

Quote:

> This newsgroup if for standard C++  questions alone

You don't seem to see that you're crossposting to comp.lang.c.
We don't appreciate C++ questions here at all.


Sat, 09 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...


Quote:
> As you may have guessed from my previous posts, I am a QuickBASIC
> programmer porting to C++.

Right.

You want to ask questions _specific_ to C++ here. Questions on

"How do I do a program on this _specific_ OS?" (DOS, Windows etc) should be
asked on a newsgroups _specific_ to your OS.
"How do I do a program on this _specific_ hardware?" (Video card, Sound
card, mouse etc) should be asked on a newsgroups _specific_ to your hardware
(or OS).
"How do I do a program using this _specific_ compiler?" (GNU, VC++, Borland
C++) should be asked on a newsgroups _specific_ to your compiler.

This newsgroup if for standard C++  questions alone

Hope this helps

Stephen



Sat, 09 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...


Quote:

> > This newsgroup if for standard C++  questions alone

> You don't seem to see that you're crossposting to comp.lang.c.
> We don't appreciate C++ questions here at all.

Oops, sorry, I missed that

Stephen



Sat, 09 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

Quote:




> > > This newsgroup if for standard C++  questions alone

> > You don't seem to see that you're crossposting to comp.lang.c.
> > We don't appreciate C++ questions here at all.

> Oops, sorry, I missed that

Nevertheless, it's good to see that there *is* a group for discussing
standard C++, should we ever feel the need so to do. Keep it up, guys...

:-)

--

Richard Heathfield

"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.

C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
37 K&R Answers: http://users.powernet.co.uk/eton/kandr2/index.html (60
to go)



Sun, 10 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

Quote:
> Ok, this is starting to make sense now...

>  There are no provisions involved with the C (or C++) langauge that will
> distinguish it between OS's....  In other words, if the program was
> written to standard, it should run on any OS that is running an ANSI
> complient compiler...

No. The ANSI standard guarantees that any programming written in ANSI C/C++
will *compile* with any ANSI compliant *compiler*. That's it. If you need
anything more, then it's not part of ANSI. Whether that 'any more' complies
with it's own standards and what OS's it will run on is another thing
altogether. ANSI is not meant to clip your wings - it just ensures everybody
is speaking the same language.

Quote:

> And since each OS treats things such as multimedia/hardware and etc.
> differently, there is no way to really standardize the programming of such
> things.

Of course there is, just make a new standard. As a matter of fact, there are
a few open standards for graphics (don't ask me names, but I'm sure someone
else can provide them), so just combine the ANSI C/C++ standard with one of
those and voila! You have a language/library combination that is a standard.
An ANSI C/C++ program *need not* run on any "ANSI C/C++-compliant" OS -
there is no such thing. It just needs to *compile* with any ANSI C/C++
*compiler*.

Quote:
> Am I right in these assumptions...???*s*  This type of thing wasn't a
> worry for me with my Micro$oft dependant compilers....  And I'm starting
> to respect the fact that there IS an ANSI starndard...

> However...

> I'm guessing that if there were standards set for multimedia and the like
> (instead of OS dependent features), then maybe the ANSI standard WOULD
> make use of such aspects in its definition...

I really think that should be separate from the current ANSI standard - or
even future ANSI standards. It should concentrate on the essence of the
language, not all sorts of things that can and will change in the near
future - hardware being a prime example. You can create a
hardware-independent standard for graphics, but I don't think it should be
tucked on to any language standard - it would be, forgive the wording, quite
off-topic for that standard. Such things could be done language-independant,
and could become ANSI standards themselves...

X.

PS. Please start a new thread if you want to continue the discussion in a
new direction.



Sun, 10 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

Quote:



>> Ok, this is starting to make sense now...

>>  There are no provisions involved with the C (or C++) langauge that will
>> distinguish it between OS's....  In other words, if the program was
>> written to standard, it should run on any OS that is running an ANSI
>> complient compiler...
>No. The ANSI standard guarantees that any programming written in ANSI C/C++
>will *compile* with any ANSI compliant *compiler*.

It doesn't guarantee that at all. The C standard requires a C compiler
to be able to translate and execute a single C program the compiler
writers specify that must meet certain minimal requirements. It need not
be able to translate and execute any other programs. It is impossible
for a C compiler to be able to compile all strictly conforming programs
because there are no code size limitations on a strictly conforming program.
A conforming C compiler must "accept" a strictly conforming program
but all that is that it can't reject bit as a C program. It could say
"sorry your program amy well be good but I don't have the resources to
compile it" or something to that effect (whether "core dumped" qualifies
is debatable. :-) )

--
-----------------------------------------


-----------------------------------------



Sun, 10 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...
Hi,

: > Ok, this is starting to make sense now...
: >
: >  There are no provisions involved with the C (or C++) langauge that will
: > distinguish it between OS's....  In other words, if the program was
: > written to standard, it should run on any OS that is running an ANSI
: > complient compiler...
: No. The ANSI standard guarantees that any programming written in ANSI C/C++
: will *compile* with any ANSI compliant *compiler*. That's it. If you need
: anything more, then it's not part of ANSI. Whether that 'any more' complies
: with it's own standards and what OS's it will run on is another thing
: altogether. ANSI is not meant to clip your wings - it just ensures everybody
: is speaking the same language.

The above paragraph is non-sense: Both the C and C++ ISO standards
(yes, there is a world outside of the USA and there are standard there,
too, and, yes, many non-USA people are involved in the definition of
the C and C++ standards) define the language to be accepted and the
behavior of resulting programs.
--

<http://www.informatik.uni-konstanz.de/~kuehl/>
I am a realistic optimist - that's why I appear to be slightly pessimistic



Sun, 10 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

Quote:
> Hi,



> : > Ok, this is starting to make sense now...
> : >
> : >  There are no provisions involved with the C (or C++) langauge that
will
> : > distinguish it between OS's....  In other words, if the program was
> : > written to standard, it should run on any OS that is running an ANSI
> : > complient compiler...
> : No. The ANSI standard guarantees that any programming written in ANSI
C/C++
> : will *compile* with any ANSI compliant *compiler*. That's it. If you
need
> : anything more, then it's not part of ANSI. Whether that 'any more'
complies
> : with it's own standards and what OS's it will run on is another thing
> : altogether. ANSI is not meant to clip your wings - it just ensures
everybody
> : is speaking the same language.

> The above paragraph is non-sense: Both the C and C++ ISO standards
> (yes, there is a world outside of the USA and there are standard there,
> too, and, yes, many non-USA people are involved in the definition of
> the C and C++ standards) define the language to be accepted and the
> behavior of resulting programs.

That, to be perfectly clear, was meant metaphorically, not literally. Coming
from the Netherlands, I naturally didn't know there was anything outside the
USA, so sincere apologies for that obviously false assumption on my account.

X.



Mon, 11 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...


Quote:

writes:



> >> Ok, this is starting to make sense now...

> >>  There are no provisions involved with the C (or C++) langauge that
will
> >> distinguish it between OS's....  In other words, if the program was
> >> written to standard, it should run on any OS that is running an ANSI
> >> complient compiler...
> >No. The ANSI standard guarantees that any programming written in ANSI
C/C++
> >will *compile* with any ANSI compliant *compiler*.

> It doesn't guarantee that at all. The C standard requires a C compiler
> to be able to translate and execute a single C program the compiler
> writers specify that must meet certain minimal requirements. It need not
> be able to translate and execute any other programs. It is impossible
> for a C compiler to be able to compile all strictly conforming programs
> because there are no code size limitations on a strictly conforming
program.
> A conforming C compiler must "accept" a strictly conforming program
> but all that is that it can't reject bit as a C program. It could say
> "sorry your program amy well be good but I don't have the resources to
> compile it" or something to that effect (whether "core dumped" qualifies
> is debatable. :-) )

Of course, but I thought that 'the ANSI standard guarantees that a C
compiler can translate and execute a single C program the compiler writers
specify that must meed certain minimal requirements, but not necessarily any
other program, despite the fact that it might be conforming, due to other
restrictions such as resource limitations' was a little long-winded.

So I just tried to give the general jist of it. Consider it all wrapped in
<informal></informal>.

X.



Mon, 11 Nov 2002 03:00:00 GMT  
 Graphics and color in C++ (or C)...

...

Quote:
>Of course, but I thought that 'the ANSI standard guarantees that a C
>compiler can translate and execute a single C program the compiler writers
>specify that must meed certain minimal requirements, but not necessarily any
>other program, despite the fact that it might be conforming, due to other
>restrictions such as resource limitations' was a little long-winded.

>So I just tried to give the general jist of it. Consider it all wrapped in
><informal></informal>.

Unfortunately you ended up with a statement that is quite simply wrong.

--
-----------------------------------------


-----------------------------------------



Mon, 11 Nov 2002 03:00:00 GMT  
 
 [ 16 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Newbie: separate big .cs file into small .cs files

2. Need C++ text for non cs major course

3. System.Drawing.Graphics.Clear(Color color) gives me a Compile Error

4. How to show/call Form2.cs from Form1.cs ?

5. Include code in other Cs files

6. Reuse of cs files, namespace, arch advice pls

7. word - automatic numbering/bold/underline/italics

8. How to Generate .cs file at Runtime

9. newbe/cs student, need help w/ code

10. Serial.cs

11. Compile CS source code using ICodeCompiler

12. Two CS files (using namespaces)

 

 
Powered by phpBB® Forum Software