Results 1 to 3 of 3

Thread: c++ endl and /n

  1. Default c++ endl and /n

    hi i am trying a peace of code just copying it from the examples just to get used to writing out code who comments so i know how they work but i wanted to try using the /n instead of endl i changed the endl to /n but it dont seem to print to the next line i am using the header file <iostream>

    cout << "initially, x is: /n " << x << " y is: " << y << "/n";

    is the line i am trying to use /n on

    it was

    cout << "Initially, x is: " << x << ", y is: " << y << endl;


    is there any reason the first line don't print on a second line

    kind regards luke cardall
    The pain of being alone...is not an easy one to bear..why is it...that I can understand your pain?
    But...I already have many people who are important to me now...and I can't let you hurt any of them...even if I have to kill you!

  2. Default

    Hey Luke,

    I believe you're looking for \n instead of /n. Should hopefully solve your issue

    Regards Simon

  3. Default

    lol dam new keyboard moved the \ key so when i was typing it was pressing where it used to be on my old keyboard what is where / is now ty for pitting it out
    The pain of being alone...is not an easy one to bear..why is it...that I can understand your pain?
    But...I already have many people who are important to me now...and I can't let you hurt any of them...even if I have to kill you!

Similar Threads

  1. Endl problem;
    By BsE Bloodbath in forum T2G Developer & App, Technical Discussions
    Replies: 4
    Last Post: 04-20-2012, 06:55 PM
  2. \n vs. endl;
    By Gerrard4000 in forum T2G Developer & App, Technical Discussions
    Replies: 8
    Last Post: 09-06-2010, 06:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •