Search:

Type: Posts; User: meka

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,706

    sorry, that 's a typo. Except for that, anything...

    sorry, that 's a typo. Except for that, anything I should know about pass the array? I tried with one dimensional array and it worked. I don't know when it comes to 2d, things screwed up.
  2. Replies
    3
    Views
    3,706

    initialize 2 dimensional char array

    Can anyone tell what's wrong here? I can't get the value sent to the function

    code:

    board::board()
    {
    char pine[4][4] = { 'O' }; //assign O to all elements

    pine[0][4] = 'P'; //single...
  3. Thread: chess game

    by meka
    Replies
    1
    Views
    1,342

    chess game

    I'm writing a chess game using 2-dimensional array . The idea is simple:
    each piece has its own value, the destination got the piece's value if the move is valid.

    My trouble is my display...
  4. Replies
    2
    Views
    1,566

    How do you learn programming?

    I think I am just frustrated with a C++ test, wonder if I am capable of doing programming...The class is teaching the core concepts (class, pointers...), but things are getting confusing now.

    I...
  5. Replies
    2
    Views
    1,152

    const Date& Meeting() const;

    what is the purpose of having the leftmost 'const'?
    When do we need to use two 'const' in defining the function?
    Is there a rule?

    TKS!
  6. Thread: '&' and '*'

    by meka
    Replies
    5
    Views
    1,154

    can we do cout

    can we do

    cout << i;

    I asked this question because I think &p refers to the address.

    Thank you.
  7. Thread: class?

    by meka
    Replies
    2
    Views
    1,467

    class?

    I have a few questions about class.

    - Does every class need to have "private" members? It seems that the private members are used in initialization. If no initialization is needed, then maybe...
  8. Replies
    3
    Views
    1,188

    Thank you. That's a great hint. I will work on...

    Thank you. That's a great hint. I will work on it.
  9. Replies
    3
    Views
    1,188

    sorry, typo... input: happy "day" one output:...

    sorry, typo...

    input: happy "day" one
    output: eno "day" yppah

    thanks for reading...
  10. Replies
    3
    Views
    1,188

    really don't know how to do this

    This is a task which was said to be easy, but hours went, I'm still here...

    I'm dealing with the char array in the stack. I need to reverse the chars except for those in double quotes.

    If the...
  11. Replies
    3
    Views
    882

    Thank you, I've solved this problem.

    Thank you, I've solved this problem.
  12. Replies
    3
    Views
    882

    read data into stacks

    Suppose I did not read the data directly into a stack, because I need to to through each character to decide if it's going to be print out or not.

    My idea is to read the chars in the array to the...
  13. Replies
    4
    Views
    1,600

    input / array size

    Thank you for your help. I have not used pointer in my programs, and I will learn it soon. I still came out with two functions to do the input. So far, it seems to be working at the point.
    ...
  14. Replies
    4
    Views
    1,600

    function and input problems

    I am using a g++ compiler. The program will read from keyboard input or a given file. It will read in numbers and put them in the array for sorting later.

    Here is part of my int main (argc,...
  15. Replies
    1
    Views
    1,324

    getting input (not from main())

    a newbie question

    I try to write a program in multiple source files, the first function should get input from commend line or a given file.
    I wonder can I have argc, argv[] as a function argument...
Results 1 to 15 of 15