General C++ Programming - November 2016 (Page 11)

Using shared_from_this() in constructor
 
Hi all, As you know it is not possible to use the std::enable_shared_from_this<T> and shared_from_this() pair from the constructor of an object since a share...
[no replies]
Segmentation Fault core dumped
 
Every time i run my program, every part of the program runs until I reach this point and then it says segmentation fault core dumped. void VENDING_SUPERVISOR:...
[3 replies] Last: You haven't shown enough of your program to be certain, nor have you i... (by AbstractionAnon)
Crtique my program, am I storing configuration and language data the best way possible?
 
I'm attempting to write a multi language program that loads the language configuration from a file and then loads the language info from a resource file. I'm ve...
[2 replies] Last: Ah, okay. It was just a silly misconception I had. (by RealGiganitris)
Alternative to nested for loop
 
Hello Friends ... please help me to prevent runtime error in following code: #include<iostream> using namespace std; long long int t =0; main() { ...
[1 reply] : By the way, this line should not be legal: long long int hard ; Yo... (by doug4)
Infile, Outfile help! (1,2)
 
heyya guys i seem to be having a problem, hopefully someone can point it out, my outfile only prints out one line of results so not sure what the error is.
[22 replies] Last: One problem is here:[code firstline=65] void constructInfile (fstream&... (by Chervil)
NEED HELP WITH PROJECT
 
For my final project I am suppose to create the game " Ghost word game " and I used a Trie data structure, the problem is I don't have any validation for exampl...
[no replies]
by antago
C++ Draw in an NSOpenGLView?
 
How do you draw from a C++ class into an NSOpenGLView target?
[no replies]
Problem about //Constructor and //Destructor
 
Hello, I'm having an error on //Constructor and //Destructor Could someone please help. Thanks // Classes.cpp : Defines the entry point for the console ap...
[no replies]
Virtual destructors
 
I wrote a program that has a base class & one derived class. Do i need to make my base class destructor virtual even though i used no dynamic memory. Everything...
[2 replies] Last: Alexandrescu and Sutter in 'C++ Coding Standards: 101 Rules, Guideline... (by JLBorges)
Error ID returned 1 exit status -HELP
 
#include <iostream> #include <string> #include <fstream> #include <iomanip> using namespace std; const int NO_OR_STUDENTS = 20; struct studentType ...
[3 replies] Last: printResult 1. function prototype declaration: void printResult(ofstr... (by Chervil)
How to find a files from a folder then clear data from that file?
 
In another function definition, I had created a function that creates files so I want to know how to find a file in a folder because it has many files. I want t...
[no replies]
Please help me to coding this question using c++
 
PROBLEM STATEMENT Case Study : Simulation of an Automated Teller Machine Consider an Automated Teller Machine (ATM). The ATM have a key-operated switch that w...
[2 replies] Last: PROBLEM STATEMENT Case Study : Simulation of an Automated Teller Mach... (by Tantum)
Opening a file Error using List<string>
 
My problem is that I get an 2 errors that says: In constructor 'Dictionary::Dictionary(const string&)': could not convert 'iFile.std::basic_ifstream<_...
[1 reply] : open doesn't return a value, so testing the value it doesn't return ... (by cire)
Keylogger Bet,
 
As the titles suggests I have a bet with my friend that I can make a basic keylogger, however I am stumped, I have found a way to hide the window and from my un...
[no replies]
Undefined reference to class::function
 
Hello Everyone, I am getting an error in my code and I don't know why. The error is sh-4.3$ g++ -std=c++11 -o main *.cpp ...
[1 reply] : I don't see any implementation for NumberList::mergeArray .... (by cire)
by tritch
NEED HELP WITH PROGRAM in C++ USING FUNCTIONS
 
I have this program and I need to add a few things to it. The criteria is: Create a function that only prints out the Menu. Remember to use the correct...
[no replies]
Random movement
 
Hello, I am new to this site and I was wondering how to make random movement in c++. I am using sfml btw.
[2 replies] Last: well um, to move you do and example of how the movemen works ball.mov... (by EricZebaws)
Help with 2d array display function
 
I was wondering if someone could help me, I made this simple program below to try using 2d arrays. I am using cout currently to display the information but I w...
[1 reply] : I'm not sure what you have tried to do already, but I might create a d... (by wildblue)
by Gargy
HELP PLEASE
 
#include <fstream> using namespace std; ifstream fin("tema.in"); ofstream fout("tema.out"); int main() { int n,v ,m,c ; fin>>n; fin>>m; ...
[2 replies] Last: Thank you very much! (by Gargy)
by mxh
What I should code
 
Try to get the program to output the following things (only one at a time, since there is only one return value): thing.x thing.y thing.doStuff() thing.doSt...
[no replies]
November 2016 Pages: 1... 910111213... 23
  Archived months: [oct2016] [dec2016]

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