Beginners - October 2011 (Page 30)

by Yooper
Still stumped
 
Hello... This still has got me stumped. Is there a way to cin check the options made available. For instance, if something other than V,A,G or Q is entered it w...
[2 replies] Last: It's easily achieved: for( ; ( ( option != 'q' ) || ( option != 'Q... (by closed account zb0S216C)
Linking & more
 
Okay, so I have fairly decent knowledge of C++, but I want to use some libraries that would help me, especially in the near future. I tried linking with some ra...
[14 replies] Last: I found some more info looking through that site and found that dynam... (by Disch)
Need help - looping through a text file
 
Hey guys I'm trying to read in data from a text file using a loop. The text file has 2 types of data - a bank account id and the balance for each account. W...
[3 replies] Last: One problem is IOStream/fstream can only load strings from files.... (by TexanMonkey)
If statement
 
I need to write a program for my class in which I need to i need to create a structure that contains three public data fields for numerator, denominator, and wh...
[no replies]
by Velvet
How to pass a pointer to a class variable to a function
 
I am new to C++ and am taking a class for it, but we are not covering many things. One of the things we will not cover is dynamic memory allocation. I have ...
[no replies]
Question:
 
Hello there... I'm using bloodshed dev c++ and I want a program that terminates automatically if the user choose to exit. For instance : 1. exit Enter ...
[6 replies] Last: Dev-C++ automatically appends system("pause") :O (by anonymous23323124)
Accessing multiple variables using another variable
 
I'm actually not even sure what it's truly called, but I know that you can access multiple variables with numbers using Ex. include <iostream> usi...
[2 replies] Last: You have NO idea how stupid I feel Thanks anyways (by DavidScript)
private constructor rejected by visua studio? why
 
hi Im trying to create a singleton but visual studio is rejecting my private constructor. Why is this? aren't singleton constructors meant to be private or i...
[5 replies] Last: The error is what it says. You are trying to call Instance as if it w... (by Disch)
allocating a vector on the heap question
 
If I allocate an empty std::vector on the heap, that allocates memory for a vector object with no elements. When I add elements to the vector, it may have to re...
[4 replies] Last: Thanks for all replies, that's cleared things up. (by daniel32283)
Void Functions in Die Simulator
 
I wrote a code to simulate a die rolling 3600 times and it works and everything, but we're supposed to use a void function in it, which I did not, simply becaus...
[5 replies] Last: The name of your function is void percentdiff(double frequency , int ... (by whitenite1)
operators overload?
 
Hello everyone, I am trying to add a object of class with a double value but the result is wrong becasue, double value is stored as an integer I am posti...
[3 replies] Last: I forgot to mention that you can implement also operator overloading (... (by eypros)
Member Function Initializer - C++
 
Hello, In the book C++ How to program 5th Edition, Section 10.2, there is some code Header File: Increment.h 1 // Fig. 10.4: Increment.h 2 // Defin...
[3 replies] Last: "Member objects are constructed in the order in which they are declare... (by cuoilennaocacban)
how can i do
 
How do I work the program the user enters what he wants of the words Do we need the matrices to do it or what functions or how or what can be done
[12 replies] Last: Please write the code full (by virus ha3)
Cannot Open File
 
I am doing a program to change the parameter file. Here I have to read a text file. Search for appropriate parameter and replace it. The modified parameter cont...
[1 reply] : Next time, please use code tags (check the format table). Anyway: ... (by Gaminic)
Read Specific data from File
 
Hi, how can I read specific data from file? let's say I have file containing this: Data1: 1 Data2: 2 Data3: 3 Data4: 4 how can I make program find "Data1: ...
[no replies]
read file help
 
#include <iostream> #include <fstream> using namespace std; int main() { ifstream inFile; int even=0,odd=0,x,y; inFile.open ("hw4dataf11.txt"); if(...
[3 replies] Last: Pleas use code tags: [co de] Your code This if(!isalnum(neoWord[n... (by coder777)
Program refuses close at set intervals.
 
Hello fellow programmers. The program below has already been completed and runs perfectly except for one tiny issue. The loop refuses to close out after it meet...
[1 reply] : You might want an && instead of ||. As it is, so long as either of he ... (by Zhuge)
Fractions?
 
Hello everyone, I am working on a fraction class. But I am stuck on the code, the part where after the simplification of the fraction I need to diplay it in ...
[8 replies] Last: Thanks again freddy92 . Yes you did, I just missed that. (by detroit)
by abby11
Help with while loop
 
Hello, I have a problem dealing with while loops. I have to use the while loop to accomplish the following "Using a while loop - ask the user for integers; whe...
[6 replies] Last: Hello I had the configuration wrong for the if else statements as note... (by abby11)
Array question
 
Any idea how to write a program using string, dynamic array and pointer where the user inputs the text and output each word in the text and how many times it is...
[3 replies] Last: It might be easier if you post some code so people know what you have ... (by alhypo)
October 2011 Pages: 1... 2829303132... 59
  Archived months: [sep2011] [nov2011]

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