General C++ Programming - October 2017 (Page 11)

What does ambiguously overloading the initializer_list constructor mean.
 
Hi guys :) Pardon me if I have not framed the question clearly :/ I was reading through Herb Shutter's blog and found this guideline for class designing. ...
[no replies]
Random number generator
 
#include<iostream> #include<cmath> #include<string> #include<cstdlib> using namespace std; int main () { int x; cout << "Please input how ...
[6 replies] Last: thanks so much ! (by programnick)
by dkaip
My wxFrame dont take key events
 
I have a wxFrame and do not take key events. Can it happens because my keyboard is an old ps2? I am putting code... .... i just try with usb keyboard ... same ...
[1 reply] : I am using wxWidgets 3, Mint OS. (by dkaip)
Urgent Help..Array of Structures
 
I have an assignment and I am stuck on it and need help. Im not very good with coding so I appreciate any feedback. The assignment: Summary: Write a C++ ...
[4 replies] Last: Does what i have satisfy what is needed (by coolwhip125)
cin to an enum
 
How do I overload the >> operator to cin to a type enum?
[6 replies] Last: Great thank you all! (by jarvisw2)
help?
 
help with program that accepts a date in the format MM-DD-YYYY from the user and determines and displays the day number 1-366 and has leap year bool variable. I...
[1 reply] : DUPLICATE POST - same program, same problems http://www.cplusplus.co... (by whitenite1)
Phone Database Program - Need to Call One Function to Another
 
Hello, I am trying to write a mini-phone database program that can display phones based on name, productID, add them, delete them so forth. So I managed to comp...
[18 replies] Last: Yea the first loop is doing that. No 4 characters, based on x amount o... (by realmeal100)
by Aris
Read chars strings doubles from a txt file and put them in a class vector in order to use them
 
So, I have this records.txt file : c Ann y c Bob n t Ann +534.50 t Bob +40.00 t Bob -45.99 I want to take every line from the txt file and sto...
[1 reply] : A few problems: Line 10-13: Why are your member variables public? T... (by AbstractionAnon)
by AdamG
Extract Values from a complicated string
 
I am looking for a function to extract values from a string here are three examples of the string (it is presented all in one line to the function) ------...
[3 replies] Last: Very longwinded compared with the slick regex version above, but hopef... (by lastchance)
Just a bit of help with a function
 
help with program that accepts a date in the format MM-DD-YYYY from the user and determines and displays the day number 1-366 and has leap year bool variable. I...
[3 replies] Last: Yes. Thank you! I've corrected it now. (by JLBorges)
Does strtok() changes the string passed by value.
 
I am passing a string by value to func() which uses strtok() function. But when I am printing back the string in main() function, its modified !! Here is the c...
[7 replies] Last: Thanks, Cubbi! (by JLBorges)
Urgent! Can someone please help me with this C++ problem.
 
I've been struggling to do this as I've only just grasped the beginnings of class, public, private, etc.. and I've been really busy so would anyone please be ki...
[4 replies] Last: http://www.cplusplus.com/forum/beginner/1/ http://www.catb.org/esr/faq... (by mbozzi)
Need help looping through a text file
 
#include<iostream> #include<string> #include<fstream> using namespace std; int main() { string word; // The word entered b...
[2 replies] Last: This part of the code has problems: // Use a while loop to loop t... (by Chervil)
Help with I/O
 
I am going to say this outright this is an assignment for school and my teacher has said i can come in for help but i do not have any transportation due to hurr...
[19 replies] Last: I am still doing this program but my teacher isnt in any hurry for it ... (by Shiro12)
by slei
String literal and char*
 
Hey, I've rarely used char* in my past. I just try to avoid them and use strings as much as possible. Therefore I kinda lack knowledge about char* strings at m...
[10 replies] Last: is constexpr for variables already in c++11 ? cant remember, yeah, bu... (by slei)
Statistical groupings in data
 
I have data files that I sort through each column and analyze. I have a program that imports .csv files, reads them, and gives me a total average but I'd like i...
[9 replies] Last: if large, pre-allocate that vector. Push-back is smart enough to atte... (by jonnin)
Check if char contains certain word
 
I have a little software program, where I do an API call to retrieve the name of a device that's assigned on a server. Every once in a while though, a glitch o...
[2 replies] Last: You haven’t shown us any code, but you can use the C strstr() func... (by Duthomhas)
by Drei3
how to put printf in a inifinite loop
 
ive been trying to put printf in an infinite loop but printf just wont show up. Also I want to know how I could have an infinite loop and a certain loop serpaa...
[2 replies] Last: while(true) { printf("derp "); fflush(stdout); } (by jonnin)
Chapter 18 Section 18.3.1 Copy constructor help needed in compiling (1,2)
 
In the PPP2 book, there's the following code for the custom vector class being implemented starting from Chapter 17, for a copy constructor: vector:: vector(c...
[21 replies] Last: Continued namespace toy { void swap( vector& a, vector& b ) { a.... (by JLBorges)
Imput Buffer after Operations Question
 
Hello, I'm not asking necessarily for the answers, i'm just looking to be pointed in the right direction because I'm having a little bit of a hard time understa...
[3 replies] Last: Formatted input ( std::cin >> input ): skips leading white space, ext... (by JLBorges)
October 2017 Pages: 1... 910111213... 16
  Archived months: [sep2017] [nov2017]

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