Beginners - October 2010 (Page 41)

do-while loop conditions.
 
I'm having a problem finding information on the condition statements for loops. I'm using a do while loop.. and i want it to exit after the user enters 1 or ...
[5 replies] Last: Nevermind the != works with the && operator. Just had to reload the co... (by Johanthegnarler)
by pika
persistent objects problem?
 
hi, i'm having trouble making something resembling a circular linked list. here is my code: (i haven't gotten very far) RingNode class: class RingNode {...
[2 replies] Last: <3 <3 <3 <3 <3 <3 <3 resolved. (by pika)
Passing function pointer (error C3867)
 
Hello, I am reading values from a file then inserting them into a doublylinked list. The function is supose to insert the values in an ascending order. Righ...
[7 replies] Last: Thank you all! I went with a copy method but I did learn a bit more ab... (by malgron)
variable initialization fail
 
//Calculate balance due based on software sales. //A software company sells a package that retails for $99. Quantity discounts are as follows: //10-19: 20%, 2...
[4 replies] Last: Thank you, this works! Can you explain why? That I can see, the flag ... (by TwistingPlanets)
HAve problem of C++ programming
 
Sorry for bothering you. Do you have some idea about the below code? I cannot print the company name when I run the program. Would you please let me know which ...
[3 replies] Last: Hi all, I have done it. Thnak you so much!! (by lucas0384)
question of outer_prod(ublas)
 
I want to evaluate the outer product of two vectors v1 = (-1, 0, 1), v2 = (0. -1, 1). Below is my code. #include<iostream> using std::endl; using std...
[2 replies] Last: sorry, I am really confusing with cross product Thanks for your help (by stereoMatching)
Program doesn't work as supposed
 
okay here is code: #include <iostream> using namespace std; int main() { int a,b,rez; char choice ; cout<<"First: "; cin >> a; co...
[2 replies] Last: choice == "+" This is not how you compare cstrings. a few options: ... (by hamsterman)
by dlugo
Question regarding cases of linked lists
 
Guys, this might be kind of a silly questions but I would like a concrete answer on this so I will ask anyways. Are there 4 cases in inserting and removing a...
[3 replies] Last: That's not what I meant by 'implementation' example - a single linked... (by hamsterman)
"Error spawning cl.exe"
 
Why is it that if I compile my source code, the compiler said "error spawning cl.exe" ? Even my source code is correct, the compiler always results in the said...
[1 reply] : http://lmgtfy.com/?q=error+spawning+cl.exe From the first link: (th... (by gcampton)
Too much of the break statements(loops) ?
 
Is it a construction flaw ? I mean like is it will be a tragedy later when i will be doing bigger projects ?
[1 reply] : No, so long as you can follow it it's fine. (by gcampton)
c++ code problems
 
I'm trying to create a program that calculates net from gross pay - taxes...however after I enter my gross pay the program closes out...can anyone help me figur...
[3 replies] Last: Are you using F5 to run your program? Try ctrl + F5. (by closed account 3TkL1hU5)
by Gui726
problem about 2 dim vector
 
I created 2 dim vector, vector< vector<bouble>> vec(4,vector<double>(7)). However, one of my fuction accept input which is one dim vector, for example, functio...
[3 replies] Last: Thank you so much. (by Gui726)
Calculator Program Doesn't Work
 
Hello, I just started teaching myself to code and I am having a problem with a calculator I am trying to make. The first part is a slope calculator that then co...
[2 replies] Last: Ok thanks, I didnt realize it was such an easy fix. Thanks. (by derkaderka)
calling functions, prototypes
 
Hello all... I am new to c++, and I am trying to figure this out. I have to call on 4 functions in a program, and I can not use any Global variables at all. ...
[4 replies] Last: Declaraing a function prototype is completely different from defining ... (by Galik)
using numbers with decimal places
 
Hi everyone, I am really new to this, in fact I only installed the compiler today. I am reading the tutorials but have become stuck when trying to do some simpl...
[9 replies] Last: Even though % (modulo) means remainder of division, it is commonly tho... (by LB)
New line printing after accepting valid input
 
Hi, I'm having a couple problems writing this little bit of validation code. I basically want to validate whether it is an int value or a specific character tha...
[3 replies] Last: Oh, after looking at what you said again about requesting 2 numbers...... (by akunselm)
If statement returns wrong value
 
I can't figure out why this code won't work. I'm trying to write a program where depending on the user's income, it will place them in a tax bracket. However, I...
[9 replies] Last: That's the first I've ever seen code indented like that, actually =P ... (by Disch)
reference to pointers.
 
What is reference to pointers? And where/when do you use them? int x =10; int *p1 = &x; int *&r1 = p1;
[4 replies] Last: if you need to modify the pointer, not just the data pointed to by it,... (by quirkyusername)
by jpep
Using loop to declare matrices
 
I have an assignment to create a program that reads in multiple matrices from a file and then performs requested operations, which are also on the file. I wa...
[2 replies] Last: I think the 3D array method will work best. It should actually also ma... (by jpep)
by tupaiz
return value.
 
#include <iostream> using namespace std; void getScore(int& score); int calculateGrade(int cScore); int main() { int courseScore; cout<<"Line ...
[3 replies] Last: correct the calculateGrade(courseScore); This returns a value so i sug... (by jackel7777)
October 2010 Pages: 1... 39404142
  Archived months: [sep2010] [nov2010]

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