   Question
  Hello,I have a question.. In my book (Accelerated C++) there is an excercise, which is as follows:"Rewrite the Hello, World! program so that a newline occurs everywhere that whitespace is allowed in the program."The normal Hello, world! is as follows:// a small C++ program#include <iostream>int main(){std::cout << "Hello, world!" << std::endl;return 0;}The one I made with the newlines is as follows:// a \n small \n C++ \n program#include <iostream\n>int main(){std::cout << "Hello, world!\n" << std::endl;return 0;}I was wondering: Do I understand it correctly? Is what I have done good? If not, could somebody explain what is wrong to me and hopefully where you can put newlines.Thanks!Marlon.   
  Hello,I have the book, but not on me. A quick search though brought me to this web page with the solutions: http://www.parkscomputing.com/acpp/0/;  The objective of this exercise is to understand where newlines can be placed, and where they can't. You are expected to use real newlines (what you get by pressing the enter key), not the character '\' followed by the character 'n' (which is not a newline, but is transformed into a newline by the compiler).To reword the question: move your cursor through the code above, and press the enter key whenever you are allowed to without changing the meaning of the program.   ;  Actually you'd want to put it after Hello,you don't have to put it in your comments.  They're refering to code that will be written on screen.  So look in the quotes on cout.  which is "Hello, World"  So you'd want to place one after Hello,.edit: Looks like maybe I read it wrong too.  oops.   ;  oh thats an interesting example [smile]the point of this example is to put a new line everywhere in code where a whitespace is allowed.like:int    a    (    int    b    )    {   return   0;    }sorry i dont know if code above is really a correct example   