Beginners - November 2016 (Page 3)

Error in Calculation if/else
 
A simple ATM machine program. Opening balance is 1000. A minumum balance of 10 is required all the times. If the balance after withdrawal is less than Rm10, do ...
[5 replies] Last: @boost lexical cast im soooo sorry.. typing error haha (by DesmondLee)
assert with regular expression
 
I am attempting to test a regular expression entered by the user. The format of the entry must comply with "|number|", for example |12| would pass, whereas |...
[7 replies] Last: to avoid backslash hell, use raw strings http://en.cppreference.com/w/... (by ne555)
Values Phantom Change
 
Somehow my values change without me doing anything, and i have no idea why. somehow for my quizzes if go from having 5 10 12.5 to 85 100 25 which is the same a...
[2 replies] Last: I hate myself (by willuwontu)
by polklk
Using arrays and loops(?) to write more elegant code
 
Hey guys, Currently i'm just tidying up some of my programs code. What i'm trying to do is find a way so that I don't have 3 different if statements to go int...
[no replies]
by trav92
linking libraries ( exiv2-0.25
 
Hello I'm new to C++ coming from a Java and C background and am finding this language to be quite straightforward in terms of OOD... my issue is I'm having diff...
[no replies]
Having trouble with vector of integers in which I need to make sure that the gcd between any two numbers is 1
 
The vector's size is determined by the user so the solution needs to be generalized to a n sized vector. I have the solution to find the GCD between the whole s...
[1 reply] : #include <iostream> #include <cstdlib> #include <vector> using namesp... (by lastchance)
Vigenere table! I did it!
 
I am just sharing this because I'm proud of figuring it out myself :-) #include <iostream> using namespace std; int main() { int alpha ; ...
[9 replies] Last: http://www.cplusplus.com/forum/beginner/203513/ (by closed account 48T7M4Gy)
by wolfv
stringstream getline() only reading first line of cells
 
I want the following code to print all the cells of a comma separated values (csv) file. It only prints the first row of cells. Why is it not printing cells o...
[5 replies] Last: Thank you folks, that worked great: #include <iterator> #include <io... (by wolfv)
How Do I Create An Array of Linked Lists?
 
Like the title says pretty much. I'm to create an array of linked lists for my homework assignment and would like to know how it's made and how it also works. I...
[3 replies] Last: Also to further add to my question, is an array of linked lists basica... (by ace6208)
Understanding how to delete new dynamically allocated variables
 
This code is to simulate a train where you start with an engine and you can add train cars, detach train cars and move between train cars. I have no problem wit...
[10 replies] Last: I can modify main in the portion where I have to detach the train. Eve... (by ninjachachi)
Help With Tic Tac Toe game
 
I am working a project (Tic Tac Toe game),and I am facing problems with the human vs computer option. The part where I am facing the problem is in the main fu...
[no replies]
Derived class shenanigans
 
So, I am in a bit of a tizzy. class Derived:public Base { public: Derived():Base() //unsure of syntax here { //initialize some values that were not in base ...
[4 replies] Last: You put ( ) after class name. It should be: class Derived : public B... (by Golden Lizard)
by A34
Using a function with pointers to find a min value in array
 
Hello everyone, I'm not sure why my pointer is not returning the proper minimum value when the program runs. #include <iostream> using namespace std; ...
[1 reply] : try something like double minval = numbers ; double maxval = numbers... (by JayhawkZombie)
by Dan21
User-input on Pointers
 
I am having a little bit of trouble trying to get the user-input to work with using pointers. Here is what I wrote. //GetID, GetSongName and the rest ar...
[1 reply] : You want to cin into the data member of the class object either direct... (by gunnerfunner)
Creating a to do list
 
I am creating a to do list project that will add items to a list, start listing things off one by one, printing out to do's based off of similar importance, and...
[3 replies] Last: NudeRob I would love to use vectors but our teacher is requiring array... (by dgood42)
promp the number of character for the user in a string
 
Write your question here. #include<iostream> #include<string> using namespace std; int count(string); int main() { string str; int num; co...
[3 replies] Last: Thank you I could find the answwer!! (by kevinros)
output file got problem
 
Hi everyone , what should i do ? my output file got problem , i expected that the output file have to be same as input file , I coding it to read the input file...
[5 replies] Last: :relieved: i got it . thanks everyone . (by Zuhairah)
by Grimes
Comparing binary search trees
 
I am trying to compare binary search trees. one is given but the other i have to make so that it can be compared. what am I missing that isn't allowing the pro...
[2 replies] Last: header file template <class Object> class BST { public: BST(); B... (by Grimes)
stuck on two-dimensional array program
 
I am supposed to create a program that displays the contents of a two-dimensional array, column by column and row by row. I have a good idea but I am stuck. I a...
[3 replies] Last: The 2d array is defined as 4 rows x 3 columns. Check how many times th... (by wildblue)
November 2016 Pages: 12345... 44
  Archived months: [oct2016] [dec2016]

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