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.
Type: Posts; User: meka
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.
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...
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...
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...
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!
can we do
cout << i;
I asked this question because I think &p refers to the address.
Thank you.
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...
Thank you. That's a great hint. I will work on it.
sorry, typo...
input: happy "day" one
output: eno "day" yppah
thanks for reading...
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...
Thank you, I've solved this problem.
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...
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.
...
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,...
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...