What I can't understand is why nobody seems to think there is anything bizarre about a language that has to use the same word to mean so many different things. Static is a fine name for any one of...
Type: Posts; User: algruber
What I can't understand is why nobody seems to think there is anything bizarre about a language that has to use the same word to mean so many different things. Static is a fine name for any one of...
int main()
{
int number1;
int number2;
int stonum;
int count=0;
int num1;
int num2;
no, the number you put in the declaration is the number of elements, not the index of the highest element.
In other words, int ar[4]; gives 4 elements from ar[0]to ar[3].
Ciao Al:o
Looks to me like this is what the answers add up to:
int duration;
int gimmeHalf(int var) {return var/2};
cout <<gimmeHalf(duration);
ciao, Al;)
Since this thread has been reawakened, I want to thank everybody who helped me, and tell some of what I have learned:
1. One of the first responses was that my dream reference book does not exist. I...
Hi, :o
Let's suppose user enters: John Jim Bob and hits enter
here's how I read your getname() function
char getname() {
char arraynames[3][6]; //declare array
cout<<"enter 3...
I think your problem is connected with the fact that you can't do '=' with 0-terminated strings outside of declarations.
There are at least 4 different common string "systems" in C++ which I...
I don't know your definition of reference; mine is an alphabetical listing in which I can look up whatever is puzzling me today. And I like the answers to be complete, not shallow. Of course, I've...
This is a sorting problem. Here's the answer, in English.
1. Create an array,
2. success is when each slot contains its number, i.e. 1 has 1, 2 has 2, etc, except that 5 contains 0 which is what...
If you know how to turn a number into a string, try to figure out how to print a string backwards. Even if you don't, it's easier to think it through for a string.
Clue: if you print the letter...
Which is A and which B?
BTW, it's spelled recursive.
Al:)
It would be easier to spot the problem if you included main(), but meanwhile, what's:
if ( !validword( temp ) ) //??????????????
bool validword(int word)
{
return (...
Hi Learnin,
I hear that you can enclose pretty much any code in {}, but I am wondering why you put them there. I have never seen anything like this. If they are for documentation, a couple of...
Go back and take another look at the array reply and its use of new. New returns a pointer, so that's a good reason for needing to know how to deal with them.
So why do you need New. Because C/C++...
You don't seem to be looking for the recursive version, but if you're by any chance noy familiar with it, this may help you understand the iterative one:
double fib(int n) {
if (n<2)...
Zen, Thanks. You let me learn and vent at the same time. What could be better.
ciao
Zen, as another newbie wrestling with the same question, can you confirm what I think you said:
Here are 2 functions
1. void fn(int& n, char& c) {n=3*n;}
2. void fn(int *n, char *c)...
http://www.rt.com/man/ gives definitions & parameters of lotsa functions.
Arranged alphabetically. No time wasted.
Great site for people (like me) who forget functions and parameters.
Concise...
Hi, I appreciate everyone trying to help, and I'm still looking. I'm leaning towards "reference" titles. Any comments on the following:
Schildt: C++ The Complete Reference or C/C++ Programmer's...
I know I'm picky, but I can't find my idea of a good c++ book. If you know anything that comes close, please tell me. Here's what I want:
1. My biggest wish is for alphabetical lookup.
I want...