General C++ Programming - June 2017 (Page 3)

PPP2 Chapter 15 - Can't Open File in Japanese Age Program
 
As the title says, for whatever reason, I can't open the japanese-age-data.txt file for reading in the Japanese age graphing program at the end of Chapter 15 in...
[11 replies] Last: I also have the "Show hidden files" feature enabled. I like it that w... (by DragonOsman)
PPP2 Chapter 14 Exercise 1
 
I was working on this exercise since before and got some help for it on the PPP-public group on Google Groups to get to where I am on it now. But there's one t...
[2 replies] Last: Yes, that helped. 45 and 135. Thanks. You think Smiley looks fine, ... (by DragonOsman)
by ceeely
Modifying values in pointers in struct via function
 
Hi, I'm trying to pass a struct with 2d array pointers into a function which would change the values specific cells in the array. refer to the sample code: F...
[3 replies] Last: thanks for the tip, dhayden, I'll look into references. Is there a sam... (by ceeely)
How to Convert First Digit after Decimal to Integer?
 
I am writing a program that involves some periodic motion and, instead of tracking the specific period and time interval within that period, I am planning to in...
[3 replies] Last: Thanks for the replies. This is some good information. Now to put it ... (by Michael37)
How write *same* function to work with different elements of a struct
 
The struct in this case stores pixel data related to different components something like this: typedef struct RGB { int blue; int green; int red;...
[4 replies] Last: three functions are very similar except these details If you have s... (by Cubbi)
by omzy
include filepaths
 
I'm looking at the way a program is including other .cpp and .h files and wonder why they are able to do the following: On the file with path: /program/src/...
[2 replies] Last: Nice, Thanks a lot! (by omzy)
Undefined reference, can't find it
 
Here is the assignment: 1. The program first creates an array of 20 random positive numbers between 1 and 100. Make sure there are no duplicates in the a...
[4 replies] Last: ¿so? that's good. > The reason I did that was that the binarySearch ... (by ne555)
PPP2 Chapter 15 - Compiling exp() approximation Function Graphing Example - Help Needed
 
Until a bit recently, I was stuck on compiling the example code for graphing the approximation of the exp() function, expe(), on Chapter 15. Dr. Stroustrup use...
[no replies]
Create diretory with save game c++
 
Hello, I have a lot of questions about how to get a folder and a subfolder and a binary file This function creates a subfolder and a binary file. I actually g...
[12 replies] Last: @wsxdr Okay, I already sent it. (by coolers21)
Payroll Program...no output
 
Here is a payroll program I wrote for a class (yes, it is a homework assignment). The program compiles with no errors and the debugger seems to show nothing wr...
[2 replies] Last: /*char*/ std::string fname; //first name /*char*/ std::string lname; ... (by ne555)
Need help grouping these ideas.
 
So, I'm writing a little document for my workmates on some useful features/concepts of C++, but I'm having some difficulty in trying to group them. I current...
[2 replies] Last: This document is to give our programmers awareness of more advanced C+... (by AdrianH)
What is the version of this line without typedef ?
 
template<class T> class stacklistnode{ private: ...... }; typedef stacklistnode<T> *ptr; ptr maxlevel ; I can't understand the pointer in ty...
[1 reply] : can someone provide a way to write the two lines without typedef t... (by gunnerfunner)
PPP2 Chapter 14 Exercise 5 (1,2)
 
Exercise specifications: Define a Striped_rectangle where instead of fill, the rectangle is “filled” by drawing one-pixel-wide horizontal lines across ...
[25 replies] Last: I don't know; is it really a good idea to change Graph.h and Graph.cpp... (by DragonOsman)
by wsxdr
How to fix this SEGFAULT (1,2)
 
Hello. So, I'm trying to create a pseudorandom number generator, but unfortunately, whenever I call the function below, everything falls apart. #include <i...
[21 replies] Last: Guys, there's no need to look for a solution for this problem, I did t... (by wsxdr)
C++ difference between class member variable access from member function
 
What's difference between member1, member2, member3 on CLS class ? # include <stdio.h> class CLS { char * name = (char *) "My name is Bikash."; p...
[2 replies] Last: And, in turn, there are several different ways to access member functi... (by gunnerfunner)
Conway's Game of Life
 
Just finished my first implementation of Conway's Game of Life in C++. Here is the link: https://github.com/Turry99/Conway-Game-of-Life Any sugestions?
[3 replies] Last: Thanks for the response. I will separate the checking part and the rul... (by adsfc vxdfa)
ATmega328P not responding
 
All of the sudden my ATmega328P stopped responding to flash commands with avrdude. Here is the output of the attempt: the date sheet of atmega328p:http://www....
[no replies]
Data Structures : Stack
 
theStack.push( 1); theStack.push(2); theStack.push(3); theStack.push(theStack.popO); theStack.push(theStack.popO +theStack:popO); theStack.push(6); the...
[1 reply] : theStack.popO should probably be theStack.pop() . push adds an e... (by Peter87)
by Bank
Meaning of this statement
 
for this question: Tomorrow Peter has a Biology exam. He does not like this subject much, but d days ago he learnt that he would have to take this exam. Peter...
[2 replies] Last: #include <iostream> #include <algorithm> using namespace std; int ma... (by lastchance)
Help Please Tell Me What have i Missed
 
This is homework I had the code correct but my computer destroyed it now I have to start over please help. Problem 2.19 (Arithmetic, Smallest, and L...
[3 replies] Last: An easier way is to use functions to determine the min and max value. ... (by Thomas1965)
June 2017 Pages: 12345... 11
  Archived months: [may2017] [jul2017]

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