Beginners - January 2017

Break From Void Function
So, in my function if a certain condition is true, I want to break the code. #include<iostream> using namespace std; void checkwin(char t , char tur...
Jan 31, 2017 at 10:41pm
[1 reply] : Never mind, I just forgot about return. Lol (by closed account 3vX4LyTq)
by jeg19
string.replace help
I'm having trouble with this problem Modify secondVerse to play "The Name Game" (a.k.a. "The Banana Song"), by replacing "(Name)" with userName but without t...
Jan 31, 2017 at 7:46pm
[1 reply] : Not clear under what conditions you want to add !!!. The following co... (by AbstractionAnon)
GetOperator() and GetOperand() functions
My question is how can i implement code into this that uses a GetOperator() and a GetOperand() function to call into my main function to see if its bad input or...
Jan 31, 2017 at 7:31pm
[1 reply] : Line 8: operat is an uninitialized variable. Line 14: You're compar... (by AbstractionAnon)
by rantiv
Text decoder
The purpose of this program is to find the abbreviations in a text and to print the meaning of the abbreviations. I cant get it to print out the right abbreviat...
Jan 31, 2017 at 6:39pm
[5 replies] Last: Got it! thanks! (by rantiv)
Code not outputting calculations
I'm having a problem with my code. It is getting the input from the text file but it is not doing the calculations I'm trying to do. If there is something wro...
Jan 31, 2017 at 6:33pm
[2 replies] Last: Hello fufusus, Your program works, but with knowing what the "data fi... (by Handy Andy)
Creating & Compiling Larger Applications With MSVC/GCC/G++
Hi, I am having trouble finding information on what processes one should take when creating a project with one of the visual studio or gnu compilers for c++ wit...
Jan 31, 2017 at 6:01pm
[2 replies] Last: 1) What ever compiler you like. I prefer MSVC. 2) If you're using ... (by AbstractionAnon)
Help! right triangle
This code is supposed to determine whether the sum of the squares is a right triangle or not, and i cant figure out for the life of me why its not working. ...
Jan 31, 2017 at 5:56pm
[2 replies] Last: Thanks so much! (by MichaelMorcos)
makefile question
I'm trying to create a makefile to make executables for flist2c.cpp and mlist2c.cpp what else do I need to put in the makefile #this is makefile2c # cre...
Jan 31, 2017 at 5:48pm
[no replies]
by Potion
(Beginner) string variables not equaling in if statement
I'm new to learning C++ and following a book. I can't seem to figure out why I keep receiving the cout from the else statement instead of from the if statement...
Jan 31, 2017 at 4:43pm
[3 replies] Last: Thank-you both very much! I took out cin >> my_pass; and it worke... (by Potion)
by pumzye
For Loop not Working
Hello My for loop seems not to be working. I am meant to get the first 8 characters of a name excluding spaces nor alphanumeric character. //Create a...
Jan 31, 2017 at 4:18pm
[9 replies] Last: Hello pumzye, The problem I figured out is the name before "B Nichola... (by Handy Andy)
Reading from a text file
I'm working on a school project where I need to read data from a file. Each item in the file is separated by ';' to indicate the end of the preceding item. I ha...
Jan 31, 2017 at 2:44pm
[4 replies] Last: Mantorr22 , I wonder why someone reported our responses? Bobbyjy , ... (by dhayden)
How to Add spaces to variable outputs?
Hello, I would like to know how to have console space the result Variable in the output. For example if I run the code, it shows: "Here is the result: 5Pres...
Jan 31, 2017 at 8:02am
[2 replies] Last: change line 17 to: cout << " Here is the result: " << result << endl... (by SIK)
Passing an array of pointers to a function
I have this code, which passes an array of pointers to a function. My question is the comment at the end of the code. int main() { double a = 46; doubl...
Jan 31, 2017 at 4:44am
[3 replies] Last: > How an I make my example work with pointers? Why do you want to wor... (by JLBorges)
by play4u
Recursive backtracking maze solver
Hello! I'm trying to write a program which finds if there is a path in a maze which is determinated by a 4x4 matrix. If the Aij element of the matrix = # then i...
Jan 31, 2017 at 2:24am
[3 replies] Last: Uhm.. I leave it marked # on purpose, so my recursion knows it should... (by cire)
comparing std::vector<string> to std::char
let's say I have a vector of strings. vector<string> words; and I want to compare each character in a word from that vector of strings. how can I do that? ...
Jan 31, 2017 at 1:35am
[1 reply] : // http://www.stroustrup.com/C++11FAQ.html#for for( const std::stri... (by JLBorges)
C++ beginner help
For some reason the code is giving me an output for the discountpercentAwarded is 432120. Im trying to get the output to be according to my choice of books purc...
Jan 31, 2017 at 1:28am
[1 reply] : #include <iostream> #include <iomanip> int main() { // use doubl... (by JLBorges)
New to c++
Hi guys, I'm new to c++ and wanted to know if there was any good reference websites and website where i can just get some code and have a look at it. I have co...
Jan 31, 2017 at 1:02am
[3 replies] Last: Thank you (by paul5473)
by Bizzy
Gregorian Date Checker
Hi, so I'm trying to write a bool function that determines whether a date is a Gregorian date or not. A date cannot be Gregorian if it is from September 13, 175...
Jan 31, 2017 at 12:47am
[3 replies] Last: I really appreciate it, man! I'll see how it works with my project. (by Bizzy)
Hard to understand loop in user defined function.
Hey everyone, I'm new to c++. I'm good at all others except user defined functions. Can you please help me to give me basic understanding of user defined funct...
Jan 30, 2017 at 10:56pm
[1 reply] : I presume you have read these? http://www.cplusplus.com/doc/tutorial/f... (by keskiverto)
Save the file in an array of values
There is a class for creating an array and class that stores the values of this array in the file. It saves only the address, but I need value. I can not find m...
Jan 30, 2017 at 10:08pm
[no replies]
January 2017 Pages: 123... 24
  Archived months: [dec2016] [feb2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.