Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #12094
| From | Victor Bazarov <v.bazarov@comcast.invalid> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: nested for/while loops |
| Date | 2011-12-06 10:24 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jblc45$msf$1@dont-email.me> (permalink) |
| References | (5 earlier) <31ef277e-863c-42fa-82b8-3e2b238d3866@t16g2000vba.googlegroups.com> <jbit92$gu9$1@dont-email.me> <3040eb13-e1b5-4955-a3a1-106e47eb6181@g7g2000vbd.googlegroups.com> <901dbf42-ec9c-44e5-b40f-225e95aa9344@u6g2000vbg.googlegroups.com> <1814981b-d0d5-4631-a8f9-9414001c4762@e2g2000vbb.googlegroups.com> |
On 12/6/2011 8:02 AM, ahso wrote:
> now I did a vector[x/y][rgb]
> x or y and the color seems ok now how to draw this?
>
> for( int laty=0; laty< Terrain_Size; laty++ ){
> for( int lonx=0; lonx< Terrain_Size; lonx++ ){
> draw in opengl colored points
> }
> }
> doesn't obviously work.
"Obviously"?... Well, yes, the
draw in opengl colored points
is not C++ code (unless those are names of some macros that, when
substituted, produce compilable C++ code). Try replacing it with, say,
printf("point: %d %d\n", laty, lonx);
and see if it "works" then.
> how should those for loops look like?
The loops look OK, *given* certain assumptions. But my assumptions can
be totally different from yours. State yours, and we can verify.
Also visit: http://catb.org/~esr/faqs/smart-questions.html and
http://www.parashift.com/c++-faq-lite/how-to-post.html
V
--
I do not respond to top-posted replies, please don't ask
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
nested for/while loops ahso <ahso47@yahoo.com> - 2011-12-04 07:04 -0800
Re: nested for/while loops ralph <nt_consulting64@yahoo.net> - 2011-12-04 10:32 -0600
Re: nested for/while loops Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-04 09:23 -0800
Re: nested for/while loops Victor Bazarov <v.bazarov@comcast.invalid> - 2011-12-04 12:41 -0500
Re: nested for/while loops ahso <ahso47@yahoo.com> - 2011-12-04 22:56 -0800
Re: nested for/while loops Werner <werasm@gmail.com> - 2011-12-05 02:13 -0800
Re: nested for/while loops ahso <ahso47@yahoo.com> - 2011-12-05 06:19 -0800
Re: nested for/while loops Victor Bazarov <v.bazarov@comcast.invalid> - 2011-12-05 11:59 -0500
Re: nested for/while loops ahso <ahso47@yahoo.com> - 2011-12-05 23:07 -0800
Re: nested for/while loops Ian Collins <ian-news@hotmail.com> - 2011-12-06 20:15 +1300
Re: nested for/while loops Nick Keighley <nick_keighley_nospam@hotmail.com> - 2011-12-06 01:37 -0800
Re: nested for/while loops ahso <ahso47@yahoo.com> - 2011-12-06 05:02 -0800
Re: nested for/while loops "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-12-06 16:13 +0100
Re: nested for/while loops Victor Bazarov <v.bazarov@comcast.invalid> - 2011-12-06 10:24 -0500
Re: nested for/while loops Werner <werasm@gmail.com> - 2011-12-06 00:03 -0800
csiph-web