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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:30:26+00:00 2026-05-29T07:30:26+00:00

If I have a main function like this: int main(int argc, char **argv) {

  • 0

If I have a main function like this:

int main(int argc, char **argv) {
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
    glutInitWindowSize (800, 600);
    glutInitWindowPosition (100, 100);
    glutCreateWindow ("A");

    init();
    glutIdleFunc(update);
    glutDisplayFunc(draw);
    glutReshapeFunc(resize);
    glutKeyboardFunc(keyboard);
    glutSpecialFunc(specialKeyboard);
    glutMouseFunc(mouse);

    cout<<x<<" "<<"Printed out variable x"<<endl;
    cout<<y<<" "<<"Printed out variable y"<<endl;
    cout<<z<<" "<<"Printed out variable z"<<endl;
    glutMainLoop();
    return 0;
}

Where can I see the result of the cout calls?

  • 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-29T07:30:27+00:00Added an answer on May 29, 2026 at 7:30 am

    If you’re working in a Console Application Project, then the output should appear on the console (the command prompt-like window that opens with the OpenGL window).

    If you are not working in a Console Application, and you have a Win32 or Empty project instead, then you will have to set the subsystem linker flag to CONSOLE, as mkaes pointed out in his comment. To do so (in Visual Studio 2010):

    • Right click on your Project in the Solution Explorer.
    • Click ‘Properties’ at the bottom of the list that pops up.
    • In the navigation list on the left, expand ‘Linker’ and click on ‘System’.
    • The first variable in the list should be labeled ‘SubSystem’.
    • Click on the dropdown for this variable, and select ‘Console (/SUBSYSTEM:CONSOLE)’
    • Apply the settings and run your project again.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Essentially, the int main( int argc, char** argv ) does exactly that (or to
Im looking to have a common parent function like so void main (param 1,
I have this code: void PrintMainParameters(int n, char* array[]) { int i = 0;
In a C project, I have a main() function in several files. When I
I have a main thread that invokes a child thread function at different times
Okay here's the program I have typed up(stdio.h is included also): /* function main
I have a function thats the main bottleneck of my application, because its doing
I have a function to load a html part into a element in main
I have a number of iframes calling a function in my main page. Is
I have two WIN32 DLL projects in the solution, main.dll should call a function

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.