Search:

Type: Posts; User: C++Newb

Search: Search took 0.01 seconds.

  1. Thread: decoding code

    by C++Newb
    Replies
    3
    Views
    1,027

    I don't know. I have never seen it before.

    I don't know. I have never seen it before.
  2. Thread: decoding code

    by C++Newb
    Replies
    3
    Views
    1,027

    decoding code

    do{
    infile >> c;
    }while (c != 5 && c != 9);
    b = 7-c;
    b = b*b;
    cout << "b= " << b;
    if (c < 10)
    cout << "yes\n";
    else
    cout << "no\n";
  3. Replies
    11
    Views
    1,405

    In the function a is assigned x - 'x' is it not?...

    In the function a is assigned x - 'x' is it not? I understand it was initially assigned to 26 before the function was entered. you say c gets the value passed into it I dont see where anything is...
  4. Replies
    11
    Views
    1,405

    I know but I thought maybe a being the first...

    I know but I thought maybe a being the first character and c being the third might add to the fourth d... I know I fail at C++

    Ok so what would that be equal to? Is their anyway to add them with...
  5. Replies
    11
    Views
    1,405

    Ok so in this case their is only one previously...

    Ok so in this case their is only one previously created char variable so it is automatically going to reference that. If you had more then one previously created char variables how would you know...
  6. Replies
    11
    Views
    1,405

    I don't understand why changes made to x would...

    I don't understand why changes made to x would affect ch I understand reference parameters but aren't they two distinct variables?
  7. Replies
    11
    Views
    1,405

    could a +c = d?

    could a +c = d?
  8. Replies
    11
    Views
    1,405

    Ok what about x - 'x' and a+c assuming we cant...

    Ok what about x - 'x' and a+c assuming we cant use the asking code or whatever its called because this is part of a practice midterm and we wont be expected to know the asking codes for chars
  9. Replies
    11
    Views
    1,405

    C++ printout help

    #include < iostream >
    using namespace std;
    int a;
    char ch;
    void test2(char& x, int c){
    int b;
    a = x - 'x';
    cout << a << c;
    b = a+c;
    x--;
  10. Replies
    8
    Views
    1,377

    I wont be able to use that either...

    I wont be able to use that either unfortunately...here is a sample of code I am working on basically I need to do something once and then terminate when I read in a \n or return. the code in question...
  11. Replies
    8
    Views
    1,377

    Ok I know I need to use and that is a while loop...

    Ok I know I need to use and that is a while loop the loop must read in all of the characters until it reads in a \n(return)
  12. Replies
    8
    Views
    1,377

    I cant use that function unfortunately. The way I...

    I cant use that function unfortunately. The way I am supposed to do it is probably not the way a real programmer would do it. Is their any other ways to do it you know of?
  13. Replies
    8
    Views
    1,377

    How to dispose of unused characters

    Hello I am currently in a 1st year Comp sci class and am having trouble with one aspect of a program I am trying to write. Basically the program calculates tax payable based upon whether or not the...
Results 1 to 13 of 13