General C++ Programming - July 2014 (Page 25)

lambda functions causing errors
so im trying to write a function that extracts chunks of numbers from a stream (ie if i had "ui33ui24ui23hjdwejf" it would extract the chunk 33), and its finish...
Jul 1, 2014 at 11:44pm
[1 reply] : You want the body of the of the function in the header file for templa... (by closed account 10X9216C)
BST
How to insert 10 different numbers to a BST and print out randomly?
Jul 1, 2014 at 10:47pm
[2 replies] Last: Your asking a whole lot in a small question. BST's are widely document... (by closed account G26pX9L8)
iterating over a stream
so i am refactoring this function: http://pastebin.com/mv85KMTk because it was incredibly messy before, and have gotten to the set of cases at lines 20-22. orig...
Jul 1, 2014 at 10:07pm
[2 replies] Last: yeah thats what im kind of doing. i actually figured out a solution th... (by Little Bobby Tables)
fstream doesn't protect file?
Hey, This is more of a general question than a specific code question, but I think it fits into this forum. I was doing some file work. (I'm writing my own a...
Jul 1, 2014 at 9:12pm
[no replies]
Header for library
Hi all, I have a design consideration regarding shared libraries and the common approach to this problem . The following is the situation. I'm currently wri...
Jul 1, 2014 at 9:10pm
[9 replies] Last: I'll go with the two separate headers, a solution that seemed be be an... (by closed account G26pX9L8)
Undefined Reference Errors?
I am having compilation linker issues and am looking for an explanation as to what is causing the error and how to fix it. The declaration of header files it is...
Jul 1, 2014 at 9:06pm
[14 replies] Last: OK, appreciate the heads-up. Thanks for the help. (by dptru10)
File variable help.
I am trying to substitute a variable for the file directory. Here is the error: error: no matching function for call to 'std::basic_ofstream<char>::basic_o...
Jul 1, 2014 at 7:52pm
[2 replies] Last: That Works!! Thank you very much!! (by Tyler151)
float gets unwillingly outputted as int - using Operator Overloading
Hey Guys, I fooled a bit around with the Operator Overloading and stumbled across something I don't understand yet. I've uploaded this mini program here (htt...
Jul 1, 2014 at 6:47pm
[1 reply] : int Hypothenuse() returns an int. (by Caligulaminus)
trying code for removing all white space from a line of a txt file
hi all, I am amateur in c++ coding hope you guys will help me. this is the code I tried in my code block 10.05.....tried code for removing all white space from...
Jul 1, 2014 at 5:00pm
[9 replies] Last: Please use code tags when posting code, to make it readable: http://w... (by MikeyBoy)
LAN Games
Hi, I'm making a simple single-player game. Now, assume I've made the game, how would I go about making it available to play on LAN? (I'm not really bothered ab...
Jul 1, 2014 at 4:18pm
[3 replies] Last: Thanks (by Irrelevant Elephant)
MultiLevel pointer in C++
Hi, in the last time i was using the debugger in the CheatEngine, and i know how to write base address + offset in C++. but, multilevel pointer is something ...
Jul 1, 2014 at 3:18pm
[1 reply] : Nobody help? :( (by Kalir44)
by judo11
How to trap negative integer inputs in C++ program?
A program that asks 10 positive integers and classify them as odd or even positive integer inputs. The algorithm has to trap negative integer inputs. The output...
Jul 1, 2014 at 2:18pm
[3 replies] Last: First of all, you need an array if you want to capture 10 integers. Ri... (by Computergeek01)
comparing chars in a while statement
Hi there, im trying to do this but it can never seem to work. #include <iostream> using namespace std; int main () { char charOne; cin.get(charOne); cin.ign...
Jul 1, 2014 at 11:46am
[6 replies] Last: It's simpler (and generally better) to use std::string. But if you d... (by Chervil)
How would you describe the modulus function in c++ utilizing equations that don't include the actual modulus function
If x mod y equals a. I know that a = the remainder of x divided by y. I've got a mental block and I can't figure out how I'd program mod without the utilizati...
Jul 1, 2014 at 8:57am
[5 replies] Last: Hint: Think about what integer division (division of two integers) giv... (by Peter87)
Problem with POCO libraries on VS 2012
I followed the directions here to setup up POCO: http://www.davidrogers.id.au/wp/?p=1697. For the most part it worked fine, until I tried to compile a test p...
Jul 1, 2014 at 8:17am
[4 replies] Last: PocoFoundation d .lib and PocoFoundationmd d .lib are the debug versio... (by Lodger)
Holding function in variable and changing it dynamically
I need a variable that will just hold a function that I can change in the middle of the application, even to different function type with different amount of pa...
Jul 1, 2014 at 6:34am
[12 replies] Last: > well I have reply struct that holds a pointer to the string (that wi... (by JLBorges)
Retrieving class types from file efficiently
Suppose your program has many concrete subtypes of Person, and each person will have their own file saved, with their type stored in that file. When reading th...
Jul 1, 2014 at 5:18am
[4 replies] Last: > remove the repeated lines in the visit overrides ... > adding a new... (by JLBorges)
Pig Latin converter using only null terminated c strings
I'm needing to make a pig latin converter using only null terminated cstrings. I keep getting a segmentation fault error and can not figure out why. Also, only ...
Jul 1, 2014 at 4:54am
[1 reply] : I'm needing to make a pig latin converter using only null terminated ... (by cire)
by AllT
VC++ "vector iterator + offset out of range"
Any idea why this throws that exception? Compiler: Visual C++ 2013 Update 2 auto arrPtr = boost::any_cast<std::vector<uint16_t>>(&it->second); m_someArra...
Jul 1, 2014 at 4:37am
[1 reply] : It doesn't matter how many items I reserve, it still throws. reser... (by cire)
by TRH123
i want to align the output, where it says gpa
#include <iostream> #include <iomanip> #include <string> #include <time.h> using namespace std; class Student { private: string name; double gpa; ...
Jul 1, 2014 at 3:49am
[3 replies] Last: What do you want to do on this section? You say you want to align it, ... (by Yay295)
July 2014 Pages: 1... 23242526
  Archived months: [jun2014] [aug2014]

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