VC7: cstdio doesn't put printf in std 
Author Message
 VC7: cstdio doesn't put printf in std

Just checking:

Why is it that the cstdio doesn't put stdio.h into the std namespace?  Is it
because the Koenig lookup rules still aren't quite right in VC7?

Will this (probably) be fixed in VC7.1?



Tue, 05 Oct 2004 03:07:03 GMT  
 VC7: cstdio doesn't put printf in std


Fri, 19 Jun 1992 00:00:00 GMT  
 VC7: cstdio doesn't put printf in std

Quote:

> Why is it that the cstdio doesn't put stdio.h into the std namespace?  Is it
> because the Koenig lookup rules still aren't quite right in VC7?

Uh, it does. Like many other implementations, it leaves stdio.h alone -- to
define all the C names in the global namespace -- then imports those names
into the std namespace. That's not exactly what the C++ Standard calls for,
but it's about as close as most try to get.

Quote:
> Will this (probably) be fixed in VC7.1?

No need.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com



Tue, 05 Oct 2004 03:17:01 GMT  
 VC7: cstdio doesn't put printf in std


Quote:

> > Why is it that the cstdio doesn't put stdio.h into the std namespace?
Is it
> > because the Koenig lookup rules still aren't quite right in VC7?

> Uh, it does. Like many other implementations, it leaves stdio.h alone --
to
> define all the C names in the global namespace -- then imports those names
> into the std namespace. That's not exactly what the C++ Standard calls
for,
> but it's about as close as most try to get.

Ah!  Got it.  Thanks!

(I was trying to test it the wrong way.  My mistake.)



Tue, 05 Oct 2004 03:40:16 GMT  
 VC7: cstdio doesn't put printf in std


Fri, 19 Jun 1992 00:00:00 GMT  
 VC7: cstdio doesn't put printf in std


Quote:
> Just checking:

> Why is it that the cstdio doesn't put stdio.h into the std namespace?  Is it
> because the Koenig lookup rules still aren't quite right in VC7?

> Will this (probably) be fixed in VC7.1?

This program works in the released version of VC7:

#include <cstdio>
int main() {
  std::printf("Hi, Earth!\n");

Quote:
}

What makes you say stdio.h is not put into
the std namespace?  That's not a name of
the sort namespaces can contain.

--
-Larry Brasfield
(address munged)



Tue, 05 Oct 2004 04:39:36 GMT  
 VC7: cstdio doesn't put printf in std

Quote:


> > Just checking:

> > Why is it that the cstdio doesn't put stdio.h into the std namespace?
Is it
> > because the Koenig lookup rules still aren't quite right in VC7?

> > Will this (probably) be fixed in VC7.1?

> This program works in the released version of VC7:

> #include <cstdio>
> int main() {
>   std::printf("Hi, Earth!\n");
> }

> What makes you say stdio.h is not put into
> the std namespace?

I goofed the test I was doing.  I did:

#include <cstdio>
int main(){
    printf("Hello World!\n");

Quote:
}

and when it compiled cleanly, I assumed....

and we all know what happens when one assumes.

When I did the test above, it worked.

Oh well.



Tue, 05 Oct 2004 05:14:08 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. printf, puts, gets etc don't work when stepping into

2. Why you should use puts(3) when you don't need printf(3)

3. unresolved std::_Xran and std::_Xlen with VC7

4. SYSINCL.dat doesn't seem to work in VC7.1

5. __FILE__ doesn't contain path in VC7 ?

6. doesn't printf need stdio.h?

7. Why doesn't f2c produce printf?

8. why doesn't printf work right?

9. I put the counters but still doesn't work

10. replacing printf with my printf, then calling C lib's printf

11. ?CDaoRecordset::GetFieldValue doesn't put string in .bstrVal

12. std::map doesn't work !!

 

 
Powered by phpBB® Forum Software