[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Win32 Port of Safari
From:       Stephan Johach <lucardus () onlinehome ! de>
Date:       2003-01-09 17:15:54
[Download RAW message or body]

Hi!
Am Donnerstag, 9. Januar 2003 00:05 schrieb Alan Gutierrez:
> There are some C++ compiler issues. It looks like VC++ found some typos.

If you are using an MS C++ compiler older than VisualStudio.NET than be
aware that it's not very standard compliant in some cases.

Example

for (int i=0; i< 10; i++)
	puts("Blah\n");

printf("%d", i);

VisualStudio prior to VS.NET compiles without even a warning. The variable
i is handled as if it was declared before the loop.

int i;
for ( i=0; i<10; i++)
...

The standard says i is only valid in the scope of the for construct, so i is 
not declared for the printf().

So expect more pitfalls. :)

Stephan


-- 
http://www.wormsalt.de
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic