General C++ Programming - December 2015 (Page 21)

Friend Functions and Interface
I have been reading this article by Scott Meyers: http://www.drdobbs.com/cpp/how-non-member-functions-improve-encapsu/184401197?pgno=1 specifically this...
Dec 3, 2015 at 12:17pm
[11 replies] Last: Thanks Cubbi for your reply, From your hint, I discovered that g++ ... (by TheIdeasMan)
Revisiting My Linked List
Hey guys, it's been a while since I've even dabbled with C++ but I really wanted to get the motivation to be interested in it like I used to be. I thought a goo...
Dec 3, 2015 at 8:19am
[4 replies] Last: I'm staring here looking at iterator reverse_iterator const_reverse_i... (by coder777)
by kalki
How to trim off whitespace ??
How to trim off white space and string except string which is expected?? str ="This is an example sentence." str1 ="an". I just want to print "an" in given str...
Dec 3, 2015 at 7:53am
[8 replies] Last: @coder777: Yeah both are same. I agree with you. Thank you for your re... (by kalki)
pointers & mats
Just experimenting with pointers & arrays. When I increment ptr with ++ptr, I can predict which number in my array list will be dereferenced to and it works. Th...
Dec 3, 2015 at 2:18am
[6 replies] Last: thx! (by technologist)
Having trouble with sections f &g
A group of 50 people have gone apple picking at Shady Brook Farm. Each person has collected a number of apples. The fewest apples collected is 0, and the most ...
Dec 3, 2015 at 1:51am
[6 replies] Last: You're right. Thank you. I think I finally got it. #include<iostream... (by bluemoon3701)
by mkb555
Templated nodes
For some reason, I don't think it's recognizing my constructor. I've tried replacing it with the line m_head = new Node<T>(); , which actually compiles. Howe...
Dec 3, 2015 at 12:21am
[2 replies] Last: I see! I didn't know that was correct syntax.Thanks for clearing that ... (by mkb555)
by paolot
how do I find the average of numbers of a row from excel?
Im trying to take numbers from excel and find the average of each row . I have this program but I don't know how to find the average.Maybe this program is bad....
Dec 2, 2015 at 8:33pm
[1 reply] : duplicate post: http://www.cplusplus.com/forum/beginner/180148/ (by Chervil)
TEXT ADVENTURE Competition
Hello! This discussion is about text adventure games you can submit a text adventure game and see if you win, If you win then you get the pride and bragging rig...
Dec 2, 2015 at 6:34pm
[no replies]
passing arrays & recycling initialized variable
consider this simple code: #include<iostream> using namespace std; void change_array(int array_1 ) { array_1 = 300; return; } int main() ...
Dec 2, 2015 at 5:24pm
[8 replies] Last: I get it. The temp array will do it. (by technologist)
Learning regex advice
Hello, Should I learn regex? Will I benefit from its capablities if I am going to write a text parser?
Dec 2, 2015 at 4:36pm
[4 replies] Last: By way of comparison, here's some Good Ol' Sarcasm: So you're wri... (by cnoeval)
Check if object array is empty
I know that an array cannot be "empty," but I need to check if there are still any VALUES in my array of objects How do I do this?
Dec 2, 2015 at 9:28am
[4 replies] Last: Sounds like it should work if you also have a variable that keeps trac... (by Peter87)
Initialize class array inside constructor
Duplicate post: http://www.cplusplus.com/forum/beginner/180072/ Please don't do this, it is ultimately a time waster. It won't get you more replies, just in...
Dec 2, 2015 at 8:03am
[no replies]
Help!
Hi, i have a college work to: 1) Interact with a user using parameter with this informations: *Full name, *School Subjects (>=6), *Grade of each Subject...
Dec 2, 2015 at 4:45am
[1 reply] : See: http://www.cplusplus.com/forum/beginner/180105/ (by closed account 48T7M4Gy)
Find voronoi cell containing an object
Hi everyone, I store voronoi diagram in a text file. Each line in the file contains generator point and all its voronoi cell vertices. Given an object "a" an...
Dec 2, 2015 at 3:38am
[1 reply] : The problem is equivalent to finding the nearest neighbor. https://en... (by helios)
by ptitz
What is the right way to synchronize class variables across different computers?
The basic setup is that I have 2 machines running Linux, connected via WiFi. One (server) is running a thread that updates data in a class, another(client) is r...
Dec 2, 2015 at 12:36am
[1 reply] : Just update the objects that need to be updated, in other objects that... (by closed account 48T7M4Gy)
Need code for simple demo
a c++ program that initially takes an integer value from the user as the loop’s limit. It means that the loop will execute the same times as the input from th...
Dec 2, 2015 at 12:15am
[5 replies] Last: I won't say anything about the teacher part, but ok. When you say lo... (by YFGHNG)
How to output occurrence of number in array
I created a menu and one of the options is to output the number of times a number appears in a 12 number array for example if the numbers in the array ...
Dec 2, 2015 at 12:03am
[1 reply] : If you're trying to keep track of a number of occurrences of a certain... (by YFGHNG)
by Kyle M
Growing a structure pointer array
I'm stuck on how to increase the size of my structure array through a grow function without using a vector.(not allowed to use vectors in this)I have to read da...
Dec 1, 2015 at 10:43pm
[4 replies] Last: Thanks for all your help! Really appreciate it. (by Kyle M)
Run some part of code before int main
Hi guys , How to run some part of program before int main #include <iostream> using namespace std; void startUp() { cout << "I am running before...
Dec 1, 2015 at 6:20pm
[6 replies] Last: > But I didn't understood static auto& cout_alias . i.e is cout_alias ... (by JLBorges)
Reading a specific word from a .txt file???
Hello, I have been stuck on this for a while. I have the following .txt file as shown: // ID Name Address St Zip Majr Minr 135792468 Wayne,John D...
Dec 1, 2015 at 4:20pm
[2 replies] Last: The other file2 is for another part of the program. I see what you me... (by jerryho1995)
December 2015 Pages: 1... 19202122
  Archived months: [nov2015] [jan2016]

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