General C++ Programming - May 2016 (Page 7)

newbie question about parameters
 
I have a C program with a #define as follows : #define MAIN_MSG "Testing" I want to not have it hard coded but pass it to the routine as parameter and i...
[9 replies] Last: You should probably review Macros and Functions for a good bit before ... (by Uk Marine)
Pointers, Dynamic Arrays and Exception Handler.
 
So I have this activity for programming classI'm only allowed to place codes where it says "add code here". I managed to code some of it but when i tried to cal...
[2 replies] Last: thanks for the help and advice ne555. I appreciate it. (by closed account yAUfizwU)
Where to start
 
I am fairly familiar with c++ and a few other languages. I was wondering where would i need to start with coding my own simple app. I tried looking different th...
[7 replies] Last: What language do you want to use? For C++ SFML or SDL are popular for... (by Thomas1965)
Binary Search Tree Operations
 
Hi! I have a homework based on the BST. I have some of the operations from the class but some I had to implement by myself. The problem is that I implemented al...
[1 reply] : Your insert_rec() and *Traversal() methods look good, but I'm havi... (by dhayden)
why size of allocated memory to array is wrong ?
 
Hi, I write simple program to allocate memory to char array. #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char **argv) { ...
[11 replies] Last: A 16-byte allocation granularity is perfectly normal assuming the comp... (by nikcpp)
Managing Containers of Pointers
 
Hey all, Would you recommend managing containers of pointers through unique_ptr<T> interfaces? In an effort to keep memory management errors to a minimum, I wa...
[2 replies] Last: Thank you! This is helpful. I didn't know about std::make_unique_ptr()... (by Aaron Vienneau)
by Xriuk
Anonymous object outside main
 
I have such helper class/struct to call functions on initialization, and I need to create anonymous variables for it, but C++ does not allow it outside main(), ...
[6 replies] Last: An anonymous object/variable/instance declaration needs to be within a... (by Little Captain)
by Peril
Problem Reading Inputted Integer.
 
Hello. I've been asked to do this function which basically reads an inputted integer and then returns the number of even, odd, and zero digits in this integer. ...
[2 replies] Last: Yeah, I figured that out. Thanks. (by Peril)
problems declaring derived class objects in a base class
 
This assignment is not yet finished, but I can not figure out why it will not run as is. It is supposed to calculate "the money earned for 4 separate quarters, ...
[1 reply] : struct A { B b; }; struct B : public A {}; This is essentially the ... (by cire)
by joho
Read data from text file
 
Hey guys, currently i'm doing my project but i have stuck on some part. I have 1 text file with have 3000 line which have save length of data, From that text fi...
[8 replies] Last: @Chervil sorry for late reply..from your given code..mostly i understa... (by joho)
*Is This Possible?*
 
Is there a way to know exactly each line of code a program is running? Let's say for example I wanted to know all the lines of code Norton Antivirus is running ...
[2 replies] Last: "very sleepy" don't show you exactly the code lines, buts the function... (by closed account 48bpfSEw)
Map Holding a void*
 
I'm writing a program to overload the new and delete operators. I'm doing this so that every time the new operator is called, it saves the info of the new point...
[3 replies] Last: yes, very strange the access violation! may be you'll find an answer ... (by closed account 48bpfSEw)
How to create a vector function?
 
Hello, so I am having trouble creating a vector function. The function is suppose to take 2 vectors as its parameter and return a vector I thought the format...
[1 reply] : std::vector<int> function(const std::vector<int> &v1, const std::vec... (by helios)
by RSINGH
C++ program. Need solution.
 
In this project, you will sort envelopes as they arrive at the post office. Your program should sort the envelopes by Zip code and assign them to one of the fou...
[1 reply] : Double post. http://www.cplusplus.com/forum/general/191304/ (by chicofeo)
Creating generic linked list to contain ALL types.
 
Hey I started this a while ago and well ran into a wall because of one major problem. That problem is that how exactly do I know the type of the next generic no...
[3 replies] Last: My suggestion, look at the way boost::any does it - by using a helpe... (by LB)
important question about standard library
 
Hi everybody, I wanna ask, if there is anyway to add std_lib_facilities.h to the standard library ?
[2 replies] Last: If you mean that you simply want to be able to #include <std_lib_faci... (by Duthomhas)
CodeEval Fizzbuzz Challenge
 
I am just trying to figure out how to program the file to read input from however CodeEval.com does there thing. They say its from a *nix enviroment. I would'v...
[2 replies] Last: Thanks man. That looks good. I was just having a really hard time fi... (by Scrubster)
by RSINGH
C++ program. Need solution.
 
In this project, you will sort envelopes as they arrive at the post office. Your program should sort the envelopes by Zip code and assign them to one of the fou...
[no replies]
Regular Expression to check for Empty fields
 
I need a regular expression to check for empty field within an input string... i Tried working with a expression at http://www.tutorialspark.com/javascript/Jav...
[1 reply] : How do you define "empty field"? If you are trying to parse a CSV o... (by Duthomhas)
std::function and std::bind problem.
 
Hi guys, I'm experiencing a problem with a bounded function. In short, I have a CheckState(int) std::function object, to which one of several different fu...
[7 replies] Last: This would be more robust: #include <iostream> #include <functional>... (by JLBorges)
May 2016 Pages: 1... 56789... 17
  Archived months: [apr2016] [jun2016]

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