General C++ Programming - September 2016 (Page 8)

how to limit time
 
like when we play games, it has limited time. How to built its source code ?
[3 replies] Last: "Project for final exam" typically indicates that you will be making s... (by Nico)
Rotating vectors for solving riddles
 
Hi, I asked a teacher of mine for a task which I could code at home as I'm awfully fast out of ideas what to code (please note that it is no homework or projec...
[3 replies] Last: Thank you very much for your reply, the explanation really helped me. (by Tathe1999)
by cmisip
Why is the destructor being called here?
 
In the following code, why is the destructor for Biscuit being called multiple times? Thanks Chris #include <cstdlib> #include <memory> #include <thread> #i...
[3 replies] Last: This problem has been solved in this related thread: http://www.cplus... (by cmisip)
by Codet
CPP toJsonFile() method not writing anything
 
I have my program here doing everything I need it to do, except it's not writing anything to a file like it's supposed to. It reads in the json file and display...
[2 replies] Last: Still no new file to the directory. :/ (by Codet)
by cmisip
functions with different arguments same typedef ? polymorphism?
 
I am implementing Listener threads that read sensor values in parallel to execution of robot movement and I need to influence the robot movement based on the se...
[7 replies] Last: This is a good distinction to make between functional and OOP. I wasn... (by cmisip)
Class Help
 
I cannot get this to link at all :( #ifndef SIMPLE_H_INCLUDED #define SIMPLE_H_INCLUDED class simple { public: simple(); void setSimple(int); int ...
[2 replies] Last: Thank you so much for writing, Were you able to get it to run as a con... (by PuppetMeat)
How to underline User input
 
#include <iostream> #include <cmath> using namespace std; int main() { const double pi = 3.1415926535897; double r,h; cout << " Enter the ra...
[7 replies] Last: Maybe I am confused. I think what you are trying to do is different fr... (by Duthomhas)
by xismn
Unrecognizable template declaration/definition
 
What am I not seeing here? Upon compilation I get an error on line 8: error C2988: unrecognizable template declaration/definition I've underlined and highlig...
[2 replies] Last: Perfect! Many thanks. (by xismn)
I am trying to do this program-> http://wcipeg.com/problem/ccc12s1-> But can not find the problem when entering in 90
 
/*I am trying to do this program-> http://wcipeg.com/problem/ccc12s1 But can not find the problem when entering in 90.*\ #include <iostream> #include <fstream> ...
[1 reply] : 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
by m7md65
program crashing
 
#include "stdafx.h" #include <iostream> #include <istream> using namespace std; int main() { int num; // (!) (001) char choice; co...
[17 replies] Last: One thing which can help is to use a consistent style of indentation, ... (by Chervil)
simulating a payment structure
 
Hello I am currently stuck on this code, it doesn't display the list and when I do change one code it endlessly loop. #include <iostream> #include <ioman...
[1 reply] : This might be a start to getting back on track: #include <iostream> ... (by closed account 48T7M4Gy)
by bozmin
constructor of a vector of structures
 
Hello I am a little bit swimming right now. I try to get names and ages of my contacts. I creates a structure for these informations, and would like to pu...
[9 replies] Last: Thank you all for your help ! i figured it out ! it was really helpf... (by bozmin)
by m7md65
help figuring out how to use sin/cos/tan before it shows the output
 
#include "stdafx.h" #include <iostream> #include <math.h> #include <iomanip> using namespace std; int main() { const double PI = 3.14259; double angle; d...
[5 replies] Last: You can simply remove rad1 = (degree*PI / 180); , since you're not us... (by xismn)
Am I on the right track/help with set/get functions.
 
Hey ive been working on this assignment for a little bit and im having some trouble. I know theres some aspects of the program that has been left out which was ...
[3 replies] Last: lol the struggle (by seanster)
How to analyze the running time of this bubble sort
 
#include <iostream> #include <algorithm> void bubbleSort( int arr , int index ) { for( int i = 0 ; i < index - 1 ; i++ ) { for( int j = index - ...
[3 replies] Last: Thank you so much, Uk Marine and TwilightSpectre. (by mpark4656)
Specialization Function Calls from other functions
 
I am trying to figure out to call a template specialization function from another. In the following short segment, I am trying to call the BLACK specific functi...
[no replies]
by Dkob1
Doubly linked lists?
 
I think all of these are the characteristics but please let me know if any are not. What are the characteristics of doubly linked list's sentinels, header an...
[2 replies] Last: I think so, that was just the question. (by Dkob1)
Pokemon classes
 
I want to try and make a Pokemon fan game from scratch with my friend.He will do the graphics,so i need to make class that will hold Pokemon and their info.I fi...
[5 replies] Last: I'm still learning the basics of C++ but I'm pretty sure you can't swi... (by leoleoleo)
by m7md65
question regarding visual studio
 
https://gyazo.com/21c3e4ccb7a9f75df8301a51f724edde I'm not exactly sure if i'm able to post a link, but i keep getting this error when i'm trying to compile ...
[no replies]
cin ">>" token undefined
 
using namespace std; #include <iostream> class Person{ public: int age; int t; Person(int initialAge); void amIOld(...
[10 replies] Last: mine is devc++4.9 i shall upgrade it. thank you and likewise (by karamelax)
September 2016 Pages: 1... 678910... 19
  Archived months: [aug2016] [oct2016]

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