Jump to content
Banner by ~ Ice Princess Silky

u53rn4m3

User
  • Posts

    76
  • Joined

  • Last visited

Posts posted by u53rn4m3

    • Lenovo Thinkpad E545
    • 15.6-Inch HD Antiglare LED-backlit Display 1366 x 768 is showing as 15.6-Inch HD Antiglare LED-backlit Display 1366 x 768
    • AMD Dual-Core A6 5350M (2.9GHz) / 4GB DDR3 RAM / 320GB 5,400 RPM Hard Drive
    • AMD Radeon HD 8450G / DVD-RW Drive / 720p HD Webcam / 6-Cell Lithium-Ion Up to 6 Hours, 12 Minutes
    • Windows 7 Pro 64-bit pre-installed / Windows 8 Pro 64-bit Upgrade Ready

    It's a pretty ok to play games with if you lower the graphics

  1. 5bxtax.jpg

    I sleep with Mosin-Nagant like the true Russian I wish I was, also gas mask because if the Germans try to gas me I'll be one step ahead of them.

     

     

    I have a 1911 in my nightstand and a Mosin Nagant rifle leaning on my head board (bayonet attached) :wub: . Honestly that's just where I've always kept them.  :)

    Noice!

    borat-thumbs-up-very-nice.jpg

    I'm hoping to get a m1911 when I turn 21!

    • Brohoof 2
  2. C++ n00b here

     

    To separate a string into two words you would have to find the length of the string you want to separate then find the space that separates them then separate them into two strings by using the .substr() method (well that is what I do)

     

    for example:

    #include <iostream>
    using namespace std;
    int main()
    {
    string name;
    cout<<"enter two words: ";
    getline(cin, name);
     
    int length = name.length();
    char space = name.find(" ");
    string first = name.substr(0, space);
    space = space + 1;
    string last = name.substr(space, length);
    cout<<"first: "<<first<<endl;
    cout<<"second: "<<last;
     
    int hold;
    cin>>hold;
    return 0;
    }
     
    output:
    enter two words: two words
    first: two
    second: words
     
     
     

     

     

    how would I make a float or int random
     

    This is what I was taught:

     

    #include<iostream>
    #include<stdlib.h>
    #include<time.h>
    using namespace std;
    int main ()
    {
          time_t seconds;
          time(&seconds);
          srand((unsigned int) seconds);
     
          int random = rand();
          
          cout<<random<<endl;
     
          //you can change the range of the random number
     
          random = rand()%10;  //the max number this can generate is 10
          
          cout<<random;
    }
×
×
  • Create New...