Beginners - March 2010 (Page 18)

Problem with code segment
 
The following code segment is supposed to output the average of the five numbers on each output line, for all the lines in the file. Instead it outputs the sum ...
[7 replies] Last: Hi liero....are you saying that count should read 5 instead of 1? I'm ... (by MicMagicFly)
Question about || operator
 
I was just wondering if someone could explain this output to me. I have this: cout<<strcmp(buf, "time")<<" "<<strcmp(buf, "time")<<" "<<(strcmp(buf, "time...
[1 reply] : "false" is zero. Anything that isn't zero is true. strcmp(buf,"tim... (by Disch)
by goosby
Undeclared Identifier in using seperate source code files
 
Hi, I have a C++ project defined with 3 source files named CRectangle.cpp, CVector.cpp and main.cpp. The main.cpp conains the entry point main() function and ...
[2 replies] Last: Thanks a lot for your quick reply and the link. I added a header file ... (by goosby)
by ToniAz
cin.getline is giving an error
 
Hello everyone, I'm trying to use cin.getlnine function to acquire a string that i've p#include ereviously declared. The program doesn't compile, it's gene...
[4 replies] Last: cin.getline() and getline(cin,string) are two different things. cin.ge... (by closed account jwC5fSEw)
by Gorgro
Using "->" on a vector
 
Hi, I'm relativly new to C++ and i am just getting into classes. I was wondering if it's possible to use the arrow operator to call a fuction from another class...
[2 replies] Last: no you cannot do that. The vector needs to be an array of pointers to... (by kempofighter)
by Zach
Wait!
 
I'm sorry if this is in the tutorial, but I've looked to were I though it should be, and its noth there. Can some one please tell me the string of code for the ...
[7 replies] Last: Thank you firedraco! You have solved my problem and the code string wo... (by Zach)
"undeclared identifier"
 
Hi, Ive recently been trying to pick up C++ (first computing language, however Ive been around programming/mathematics all my life) and I was reading a guide, a...
[6 replies] Last: Yeah, thought as much. That should do the trick. As for negative ex... (by trancetastic)
cant get output right
 
i have been doing a calendar program. this part works fine but the next part i am stuck on, this is what the question asks, it wants me to adapt the pro...
[1 reply] : if i understood correctly what the program is supposed to do, i think ... (by Mathes)
extracting numbers from line (1,2)
 
i have project in which i have to get user input for example (3/4 - 5/7) and than extract the numbers from that line and store it into four integers a,b,c,d ho...
[25 replies] Last: k i changed the index but still same error. (by babudesai)
Calling external code in C++ program???
 
I'm new to C++, but I've been a PHP programmer for years. I've searched all over, and can't seem to find an example of how I might do this code in C++. Forgive ...
[2 replies] Last: Thanks. That sheds a little light for me. (by southtucky)
C++ assignment
 
prompt
[5 replies] Last: thnx:) (by lildreamer91)
AtM simulator(How can i solve this?) - ..,thank you.
 
Write the definitions of the declared function prototypes of the given code. This program should be able to simulate ATM functionalities. For simplicity sake,...
[3 replies] Last: http://cplusplus.com/forum/general/20895/ (by chrisname)
by xerxes
How to save an element and then delete?
 
How to save an element and then delete?
[5 replies] Last: Let's write what you want to do in words. I'm assuming that the array ... (by sammy34)
Listing & Creating Node
 
My program complies through, however I am unable to create my Node nor List one. Is it possible I did my code for these wrong or the problem lies in main? And w...
[2 replies] Last: Alright, thanks. I'll remember to take them out. (by CuddlyBear)
by w0ot
Calculation error
 
i have the following codes. it prompts u to enter lst number and 2nd number. then it output the sum and average range from the lst number and 2nd number. but se...
[3 replies] Last: Here are your problems: n++; sum=n*(n+1)/2; n--; I'm not sure what... (by hamsterman)
reading txt file into vector<string>
 
hi i have a file dictionary.txt which contains a list of four-letter words which i have to read into a string vector. i have written the following code ...
[4 replies] Last: Because Duoas' code is better than mine :). In Duoas' code, note that ... (by sammy34)
by mumbi
wchar_t exception what()??
 
excuse me.. I have a question. what method is what() wchar_t version in exception class?
[4 replies] Last: Oh, thanks. these articles is very helpful for me. (by mumbi)
recursive functions with *pointer parameters
 
Here is the code I made... but I don't understand what going on in there.. #include <iostream> using namespace std; long long unsigned factorial(long ...
[12 replies] Last: Oh... thanks! :) (by adikid89)
try to make code with this with using only...
 
try to make code with this with using only: if/if...else for while do while dont use: printf() scanf() here's the problem: in C++ to determine ho...
[18 replies] Last: as liero said read tummychow's post earlier in this topic. if you w... (by chimera)
Count the number of instances in an array.
 
Hello, let me start by saying that I am extremely inexperienced and confused, so please bear with me. I am attempting to write a program in which I am given a d...
[3 replies] Last: Re: 'major weakness of mine'... I view your ability to 'have a go' ... (by sammy34)
March 2010 Pages: 1... 1617181920... 34
  Archived months: [feb2010] [apr2010]

This is an archived page. To post a new message, go to the current page.