User Profile

Collapse

Profile Sidebar

Collapse
oi123
oi123
Last Activity: Jul 20 '07, 06:51 AM
Joined: Apr 22 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • oi123
    replied to cin, cout rows and columns
    in C
    Code:
    #include <iostream>
    #include<string>
    using namespace std;
     
    
    int main()
    {
      
        int rows;
        int cols;
    	char wall;
        do
        {
        cout << "Please enter how many rows: ";
        cin >> rows;
        } while(rows <10);
         string map[rows];
        do
        {
            cout << "Please
    ...
    See more | Go to post

    Leave a comment:


  • oi123
    replied to cin, cout rows and columns
    in C
    Code:
    #include <iostream>
    #include<string>
    using namespace std;
    
    int main()
    {
    	//string sym;
    	int x, y;
    	int rows;
    	int cols;
    	do
    	{
    	cout << "Please enter how many rows: ";
    	cin >> rows;
    	} while(rows <10);
    	
    	do
    	{
    		cout << "Please enter how many column: ";
    		cin >>
    ...
    See more | Go to post

    Leave a comment:


  • oi123
    replied to cin, cout rows and columns
    in C
    example

    please enter a character for wall
    cin >> w
    please enter how many rows:
    cin >> 10;
    please enter how many columns:
    cin >> 10;



    so it create a map with 10 rows and columns

    wwwwwwwwww
    w w
    w w
    w w
    w w
    w w
    ...
    See more | Go to post

    Leave a comment:


  • oi123
    replied to cin, cout rows and columns
    in C
    I'm suppose to create a floor plan of a room that contain a floor tiles, wall and entry door and a escape hatch, a key and a piranha and have at less 10 rows and 10 columns by prompting user to enter any symbol they desire, I just don't know what method I should use :(
    See more | Go to post

    Leave a comment:


  • oi123
    replied to cin, cout rows and columns
    in C
    nested loop is a loop that inside another loop?, :( I'm so behind on this I can't figure out how to do this anymore and the program is due this Monday, my friend told me to do it as

    [code=cpp]for (int x=0; x<rows; x++)
    {
    for (int y=0; y<cols; y++)
    {
    cout >> "enter character: ";
    cin << sym;

    }
    }[/code]

    but I just don't...
    See more | Go to post
    Last edited by AdrianH; Jun 3 '07, 10:00 PM. Reason: Please use [code=cpp][/code] tags to improve readability

    Leave a comment:


  • oi123
    started a topic cin, cout rows and columns
    in C

    cin, cout rows and columns

    I don't know how do get the rows can you help me please :(

    [code=cpp]#include<iostre am>
    #include<string >

    using namespace std;

    int rows;
    int cols;
    string sym;
    int count;

    cout << "Please enter a symbol to be display: ";
    cin >> sym;

    do
    {
    cout << "\tPlease enter how many colunms to create:...
    See more | Go to post
    Last edited by AdrianH; Jun 3 '07, 09:59 PM. Reason: Please use [code=cpp][/code] tags to improve readability. AND INDENT PEOPLE!!!

  • I was wondering if I could have a link of creating classes by Ganon11 :D because I'm kind of confuse about classes.
    See more | Go to post

    Leave a comment:


  • oi123
    started a topic boolean expression
    in C

    boolean expression

    for the boolean expression
    bool validNumber(int value)
    {
    return (1 < value) and (value < 100);
    }
    why does the boolean function give me an error message about missing ; before idenitfy 'and'
    See more | Go to post

  • oi123
    replied to string :extract fullname
    in C
    but I don' t know how to find the empty space to exract the first name from last name by using the string find()

    since user can input any name they wish....
    See more | Go to post

    Leave a comment:


  • oi123
    started a topic string :extract fullname
    in C

    string :extract fullname

    How do you extract full name by looking for the space to get just the first name by itself and the last name by it self by using call by reference without using if or else
    See more | Go to post
No activity results to display
Show More
Working...