Beginners - October 2011 (Page 3)

A Few Quick Questions...
 
Well ive been a DOS programmer for quite some time, but getting into advanced programming, i bought a C++ book, helps a lot, but im working on a program I could...
[1 reply] : If you're using Windoze, I don't know what to recommend for you, but S... (by ciphermagi)
quadratic equation
 
#include <iostream> #include <cmath> using namespace std; bool quadraticFormula(double a, double b, double c, double *totalResults) { double D = sqrt(...
[1 reply] : Are you guarding against (b*b) - (4*a*c) being -ve? sqrt() can on... (by andywestken)
by Pelk
Mistery Close
 
Hello, I am unsure why my program is closing. First this function is ran void display() { optionDisplay(); string inPut; getline( cin, inPut ); ...
[5 replies] Last: That's because cin >> leaves the end of line in input stream. This end... (by hamsterman)
how to constantly search specific characters and keep doing so in c++ for a text file?
 
How do i constantly keep checking for specific characters in a text file till there are no more specific characters left. this way i can keep displaying text...
[1 reply] : anyone? (by Noobscratcher)
goto problem
 
I want to break only 2 for. Not third. int main() { for (int z = 0; z != 100; z++) { for (int y = 0; y != 100; y++) for (int x = 0; x != 100; x+...
[2 replies] Last: Yes, the ';' is the solution! Thanks! The thing about null statement i... (by chameleon)
converting for loop to while loop
 
hi, i'm a beginner at programming. can anyone help me? i can't seem to convert my loop. this is my for loop int i = 1; const char square = '&'; for (int...
[1 reply] : The scoping rules for for-loops meant you could get away with using i ... (by andywestken)
by RegenC
Strings and characters... bane of life...
 
#include <iostream> #include <string> using namespace std; int main(){ int numberofchars; string TempString; bool moveon; //variables ...
[1 reply] : As you declared InputString inside the while loop, it cannot be seen o... (by andywestken)
C++
 
hai everybody, i'm a beginners. i wanna to know how to solve this question by using loop statement? QUESTION : get the value for a,d,n from user. and s...
[16 replies] Last: There's two solutions to this problem. There's a nice little rewrite ... (by Kyon)
About swith
 
#include<iostream> #include<stdio.h> using namespace std; int main() {int a,b; scanf("%d,%d",&a,&b); {switch(a) {case 0:cout<<"zero\t";break; ca...
[1 reply] : Start by putting in cout << "a=" << a << "b=" << b << endl; so you... (by Moschops)
by cypro
Broken clock problem..
 
Hello I am trying to solve a very simple program but i dont know why my code isn't correct at all test data. The Problem: The Clock of Tom is broken and its ...
[no replies]
card game breaking
 
Hi all, Same as most pritty new to c++ making a little text based card game breaks when trying to output the cards in a hand. It compiles fine but when I ...
[2 replies] Last: Thanks for the tip, looking up realloc now :) will that solve the outp... (by Zachary Burgess)
Dynamic array that can be re-sized at runtime
 
hi how can I create a dynamic array that can be re-sized at run time. The code below is part of a while loop that has to add new data when its found but ...
[1 reply] : This is the same question as http://www.cplusplus.com/forum/beginner/5... (by andywestken)
Dynamic array that can be re-sized at runtime
 
hi how can I create a dynamic array that can be re-sized at run time. The code below is part of a while loop that has to add new data when its found but the ...
[1 reply] : 1. An array of size N has elems from 0 .. N-1. So you are setting valu... (by andywestken)
by TJ13
NEW TO C++ NEED HELP WITH HOMEWORK...
 
HEY EVERYONE...SO I HAVE THIS ASSIGNMENT THAT I'M COMPLETELY STUCK ON...ANY HELP WOULD BE APPRECIATED... THIS IS THE ASSIGNMENT: Part 1 Set up a simpl...
[1 reply] : What exactly is your problem? (You might be under programmer stress ... (by Blessman11)
help with recursion!
 
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 1...
[2 replies] Last: Add an extra "sum" param to fibevensum -- it will need to be a ref. T... (by andywestken)
DATE in string
 
Let say I have a string which is 2011-2-3 , how do I convert it into days in 365 in 2011? How do I use find function and substr function in this case?
[no replies]
Lottery Program Help
 
Hello guys, I'm new to c++ obviously, and I need some guidance programming the following: Create an array of size 6 with UNIQUE random numbers from 1-53...
[no replies]
Max efficiency in Map, question from website tuterial
 
Any one know why there is a max of efficiency in the first line and it does not in the second line mymap.insert (it, pair<char,int>('b',300)); // max effici...
[no replies]
why doses not this simple function work?
 
When I run it does not even ask what to write. It just diplays what i had cout when calling it. OK so the output is nothing. Just Press any key to continue. ...
[6 replies] Last: biplav17, nobody can confirm anything, because you haven't posted all ... (by ciphermagi)
by Lia
help me solve this problem statement
 
Please..help me solve this problem statement.. 1. Construct a C++ program that reads n positive integers. Ignore any input less than 5. The input ends with -...
[1 reply] : What about it do you need help with? (by Zhuge)
October 2011 Pages: 12345... 59
  Archived months: [sep2011] [nov2011]

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