Red or Blue Pill ?

This is a discussion on Red or Blue Pill ? within the C++ Programming forums, part of the General Programming Boards category; 1- Code: cout << "Hello EDM/2" << endl; I didnt get what does this do 2- functions initialized like Code: ...

  1. #1
    Registered User Need_O2's Avatar
    Join Date
    Jan 2008
    Posts
    13

    Question Red or Blue Pill ?

    1-
    Code:
    cout << "Hello EDM/2" << endl;
    I didnt get what does this do

    2- functions initialized like
    Code:
    int functionname(parameter1,parameter2)
    {
       Some actions using parameter1 and parameter2
    }
    ?
    (or adding a "return 0" to end if its not configured to return something like cos(x) etc)

    3- can we use booleans as 1 or 0 (dont answer this one int B2I(bool) would be easy to make)

    4- where can I find a tutorial for using math.h and window.h (I couldnt compile programs in sourceforge so I couldnt find an c++ example application that I can use as tutorial)

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    first, your post is difficult to understand.
    Quote Originally Posted by Need_O2 View Post
    1-
    Code:
    cout << "Hello EDM/2" << endl;
    I didnt get what does this do
    this do print the string "Hello EDM/2" followed by a newline character to the console
    2- functions initialized like
    Code:
    int functionname(parameter1,parameter2)
    {
       Some actions using parameter1 and parameter2
    }
    ?
    (or adding a "return 0" to end if its not configured to return something like cos(x) etc)
    you didnt ask a question here.

    3- can we use booleans as 1 or 0 (dont answer this one int B2I(bool) would be easy to make)
    try it. its not that hard to just write true or false anyways, and its more readable. its not like its wasting space either.

    4- where can I find a tutorial for using math.h and window.h (I couldnt compile programs in sourceforge so I couldnt find an c++ example application that I can use as tutorial)
    what happens when you compile it? ie what error? for math.h with gcc you have to add '-lm' to link with the math library. maybe something similar for windows.h, ive never had a need to use it so i dont know.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. String parser
    By sand_man in forum C Programming
    Replies: 13
    Last Post: 08-13-2005, 10:33 AM
  2. Getting back the Red, Green, and Blue
    By Brad0407 in forum Game Programming
    Replies: 3
    Last Post: 05-14-2005, 02:15 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. red & blue books
    By opengl_wannabe in forum Game Programming
    Replies: 5
    Last Post: 05-19-2003, 04:25 AM
  5. I need some ideas please>>
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 08-23-2002, 01:55 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21