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 3677090
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:10:45+00:00 2026-05-19T03:10:45+00:00

#define BLAH word cout << BLAH; Is there any way to do this?

  • 0
#define BLAH word

cout << BLAH;

Is there any way to do this?

  • 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-05-19T03:10:46+00:00Added an answer on May 19, 2026 at 3:10 am
    1. ‘cout’ is not something you do. It is a global variable, which is an instance of the std::ostream type. You could say e.g. “output to cout“.

    2. #define does textual substitution. It is basically the same as if you used search-and-replace in your text editor to replace BLAH with word. Thus, the line cout << BLAH; turns into cout << word;. If it’s not working, it’s because cout << word; isn’t a valid statement in that scope. The preprocessor does not care about any of the surrounding text. It has basically zero understanding of the code (it knows how to tokenize the code, i.e. break apart operators and other punctuation if you don’t put in any space, but that’s about it.)

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

Sidebar

Related Questions

I want to define something like this in php : $EL = \n<br />\n;
The following (test with gcc -E blah.c ): #define UNUSED(type) type UNUSED_ ## __COUNTER__
I have always seen people write class.h #ifndef CLASS_H #define CLASS_H //blah blah blah
Which is more correct way to return from function: void function() { // blah
I have something like the following in a string: blah blah BEGINIGNORE this stuff
Is there a way to pass an unlimited amount of arguments to a function,
I can define a function as: def print(n:Int, s:String = blah) {} print: (n:
I have seen Java code that says something like: SomeClass.this.someMethod(someArg); Blah(AnotherClass.class); Blah(YAClass.this); What do
I am defining my factories using factory_girl like this: Factory.define :user do |u| u.name
I've been thinking about doing this: <button class=ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only>Blah</button> Is there

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.