Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7897765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:15:07+00:00 2026-06-03T08:15:07+00:00

I see this line from the c++ reference for cstdio : Every element of

  • 0

I see this line from the c++ reference for cstdio:

Every element of the library is defined within the std namespace.
but I tried the code:

std::printf("hello world"); 

printf("hello world");

is it true that C++ headers puts the names in both the std and the global namespace?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:15:09+00:00Added an answer on June 3, 2026 at 8:15 am

    Including cstdio imports the symbol names in std namespace and possibly in Global namespace.
    Including stdio.h imports the symbol names in Global namespace and possibly in std namespace.

    The same applies for all c-styled headers.


    Reference:
    C++11 standard

    Annex D (normative) Compatibility features [depr] states:

    D.6 C standard library headers

    1 For compatibility with the C standard library and the C Unicode TR, the C++ standard library provides the 25 C headers, as shown in Table 151.

    Which include:

    <assert.h> <float.h> <math.h> <stddef.h> <tgmath.h>
    <complex.h> <inttypes.h> <setjmp.h> <stdio.h> <time.h>
    <ctype.h> <iso646.h> <signal.h> <stdint.h> <uchar.h>
    <errno.h> <limits.h> <stdarg.h> <stdlib.h> <wchar.h>
    <fenv.h> <locale.h> <stdbool.h> <string.h> <wctype.h>

    Further on,

    2 Every C header, each of which has a name of the form name.h, behaves as if each name placed in the standard library namespace by the corresponding cname header is placed within the global namespace scope. It is unspecified whether these names are first declared or defined within namespace scope (3.3.6) of the namespace std and are then injected into the global namespace scope by explicit using-declarations (7.3.3).

    3 [ Example: The header <cstdlib> assuredly provides its declarations and definitions within the namespace std. It may also provide these names within the global namespace. The header <stdlib.h> assuredly provides the same declarations and definitions within the global namespace, much as in the C Standard. It may also provide these names within the namespace std. —end example ]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this line of the code makes the form see-through User32Wrappers.SetLayeredWindowAttributes(Me.Handle, 0, _ 255 *
So I'm looking here and I see the command line switches. http://mono-project.com/Command_Line_MoMA This is
see this demo from jquery ui you have to hold down the Ctrl key
I see this question here on SO but I am not sure that answers
I have the following simple code (see below) I copied from a book. But
Do you see something blatantly wrong with this line: commaSepString1 = com.Parameters[@CommaSepString].Value.ToString(); It shows
See this code: var jsonString = '{id:714341252076979033,type:FUZZY}'; var jsonParsed = JSON.parse(jsonString); console.log(jsonString, jsonParsed); When
See this Image below http://i46.tinypic.com/2pt6jkn.jpg This is report in SSRS as shown when it
See this example! int main( int argc, char ** argv ) { int *ptr
I see this problem on and off again in my PHP coding, and I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.