General C++ Programming - February 2016 (Page 2)

looping issues
I'm trying to make this code be able to continue looping through until the customer is done shopping and then be able to print how many of each shoe they bought...
Feb 28, 2016 at 7:26pm
[no replies]
Need to combine two programs to make one shape/program
I have two parts to a diamond generator that I need to combine to make one program. the stipulations are that a user must enter the number of rows and the diamo...
Feb 28, 2016 at 7:26pm
[3 replies] Last: You do already ask the user for the number of rows, so it should not b... (by keskiverto)
for each loop not working as expected
My goal is to print out object array using a for-each loop. My output is a string of addresses. I've tried subscripting but that defeats the purpose of a range...
Feb 28, 2016 at 7:25pm
[5 replies] Last: It might be working but the code above is a mess. I corrected the arra... (by technologist)
program runs but it outputs all the data
hey i figured out my last problem now the problem is if i select a certain type of horse and enter the weight it outputs all the weight categories and all the a...
Feb 28, 2016 at 6:12pm
[2 replies] Last: so like this? #include <iostream> using namespace std; int main() { ... (by BuckeyeProgramerb95)
Class Hierarchys and virtual functions.
I have the following code: class B1 { public: virtual void vf(); void f(); }; class D1 : public B1 { public: void vf() override; void f(); }; void B1::vf...
Feb 28, 2016 at 5:58pm
[1 reply] : f() is not virtual so only the type of the reference (or pointer) will... (by Peter87)
issues with looping
I'm trying to make this code be able to continue looping through until the customer is done shopping and then be able to print how many of each shoe they bought...
Feb 28, 2016 at 5:17pm
[3 replies] Last: <code> and </code> is wrong. Repalce < with [ , and > with ] (by Moschops)
Checking if a function failed to convert a variable of a given type to std::string
On LearnCPP, I came across code that converts a variable of any given type to an std::string. There's also this warning there: "Note that this solution omits a...
Feb 28, 2016 at 5:12pm
[6 replies] Last: I was having trouble actually correctly calling that constructor, I gu... (by DragonOsman)
::std conversion
I want to start migrating to the std:: in place of 'using namespace standard'. What is a good reference or guide to tell me what aspects of my current programmi...
Feb 28, 2016 at 3:47pm
[7 replies] Last: Yes I have used namespaces in .h files rusty though. (by technologist)
confused on bracket placment and if/if else statments
this is what i have so far can someone please correct me where im wrong #include <iostream> using namespace std; int main() { char HorseType; int weig...
Feb 28, 2016 at 2:07pm
[2 replies] Last: Hi, Please use code tags: http://www.cplusplus.com/articles/z13hAqk... (by TheIdeasMan)
Wrong output (problem in the loop)
If the product code is found, display the record of the product and ask for confirmation to delete the record, if yes, continue with the deletion, otherwise, as...
Feb 28, 2016 at 2:04pm
[no replies]
Deleting Record
THIS IS WHAT I NEED TO DO: If the user selected D, the program will ask the user to input product code and search for it. If the product code is found, displ...
Feb 28, 2016 at 1:58pm
[5 replies] Last: thanks :) (by casescs)
question regarding a simple <queue> program!
So this program is about a queue line in the customer service at the bank. every 3 minutes a new customer arrives, and every 5 minutes a customer is done. m...
Feb 28, 2016 at 1:17pm
[2 replies] Last: @ AmmmG 01 There have been a bunch of topics about this same subject... (by TheIdeasMan)
calculate Elapsed time using functions and header file.
I am writing a code that takes two user inputted times and switches them all to seconds(using the function) gives me the elapsed time and stores it in my header...
Feb 28, 2016 at 12:54pm
[3 replies] Last: Hi, If you have your struct in a header file you need to include that... (by TheIdeasMan)
returning a struct variable
The pigLatin works fine in the word piglatin function but i can not get it to work in the latinReturn array structure outside the function. Here is my code... ...
Feb 28, 2016 at 11:49am
[3 replies] Last: Have a look at this thread, he had same problem. http://www.cplusplus.... (by Thomas1965)
Piglatin to English Array allocation to scruture
Write a function that takes in a c++ string of pig latin. This function should first calculate how many “words” are in the sentence (words being substrings ...
Feb 28, 2016 at 9:40am
[1 reply] : I am just confused about how to go about allocating an array of the ... (by Thomas1965)
ws2_32 and linker error ?
I am trying to compile a c++ program and am getting the linker error 'Undefined reference to __imp_htonl. I know this has been asked allot but I have added ws...
Feb 28, 2016 at 6:31am
[1 reply] : The answers are on this link.. http://www.gaia-gis.it/spatialite-3.0.... (by dominover)
Logical Error in this program !! what i can do ?
#include <math.h> #include <iostream> using namespace std; class statcalc {private: int dataset ; public: void enter(int); void constructor(int)...
Feb 28, 2016 at 5:39am
[1 reply] : In C++, you main() function must return an int. So line 115, change '... (by newbiee999)
beginner bubble sort .
im trying to write this program but i feel like i an too stupid to know what the hell i am doing. I dont know if im on the right track of i totally messed up. ...
Feb 28, 2016 at 3:59am
[no replies]
cin.getline() not responding
Hi! My English grammar is not good. Avoid any grammar mistake. I am trying to create a program in c++ which will store a message from user and display it latt...
Feb 28, 2016 at 3:59am
[4 replies] Last: Thanks Thomas1965 (by Faizan008)
by Anvesh
Is something wrong with my computer c++ code dosent work!
I tried the basic c++ hello world program on multiple IDE's on every IDE the code compiles and runs but nothing shows up, but the console window opens up and wh...
Feb 28, 2016 at 3:13am
[3 replies] Last: you can use ctrl+alt+delete to shut down it; install vs2005 and try i... (by alexeyn)
February 2016 Pages: 1234... 21
  Archived months: [jan2016] [mar2016]

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