General C++ Programming - May 2017 (Page 9)

by Kalcor
if-else if issue
 
Uhm I encountered a weird error that happened within these 2 codes: int step = 1; for(int i = 0; i...
[1 reply] : In the second example, there are separate if statements that all get e... (by wildblue)
Checking equality of two pointer addresses is not working
 
In function isEqualTo I'm checking equality of two addresses of one object pointer, but somehow addr...
[2 replies] Last: Thank you :)! I'm very bad with pointers :(. (by Putarda)
Base class doesn't want to delete.
 
I made mini code to just demonstrate what is my problem. So if an object is created and if initializ...
[3 replies] Last: There would be a memory leak if the constructor didn't fail because yo... (by Peter87)
by cooka
validation and menu call
 
case 1 : { char OTX; cout<<"Enter the code reserved for staff and faculty :"<<endl; cin>>OTX; ...
[2 replies] Last: yes I fixed it already but thx for ur time but actually I have anothe... (by cooka)
storing string array
 
I need help with this stupid code. void getnames(string names , int numStd) { for (int i = 0;...
[3 replies] Last: Mixing >> and getline often lead to problems like that. The easiest wa... (by Peter87)
by Kalcor
This just won't work
 
First of all, here is the question: The game has (m + 1) players and n types of soldiers in tot...
[3 replies] Last: A B C D E berserks x x x swordmen x x x pikemen ... (by keskiverto)
Employee Data Base using Data structures
 
Hello, I am still fairly new to programming and currently I'm taking a class revolved around data st...
[2 replies] Last: GunnerFunner, I have since progressed further and instead used class E... (by LordeGreg)
Return value for recursive program
 
Hi, I am writing a recursive program to return two indices of a vector whose values add up to a targ...
[no replies]
by Kalcor
Understanding this
 
Hello, can someone explain this little problem to me ? a bit of illustration would be great ^^ ...
[3 replies] Last: Adjacent means ONLY right next to. NOT anything in the same row. NOT a... (by Moschops)
Some Wrongs Occurred When Sending Data to Serial Port
 
Hi, When the 90C51(this one: http://www.kynix.com/Detail/1155503/90C51-G267.html ) serial port sends...
[1 reply] : its been a while but the 4 settings that matter on a serial port are t... (by jonnin)
std::map error: cant apply < to struct
 
hi, i want to generate a new type (struct) A. it has only 1 member variable: map< X, list<Y> > mapp...
[2 replies] Last: finally i solved it. first i overloaded operator <, but that lead to d... (by John87Connor)
Error with unordered map
 
Hello so i have this error while using unordered maps: no known conversion for argument 1 from 'std:...
[6 replies] Last: Since your program runs at coliru it's probably complier specific? N... (by mbozzi)
What does the const in this function mean in UML?
 
length() const : int I get that int is the return type here but what is the keyword const after t...
[2 replies] Last: http://stackoverflow.com/questions/3926929/const-function-specificatio... (by closed account 48T7M4Gy)
by Kalcor
EPS?
 
I see this #define EPS 1e-9 alot and Idk what EPS is? I searched it up but nothing useful related...
[2 replies] Last: it stands for the greek math symbol epsilon which is being used in thi... (by jonnin)
by Nei
Embedded C++, memory management and containers
 
Hi, I've been searching the internet for this for a while, but I could not find anything that fit...
[2 replies] Last: +1 for allocators, that's what I used back when I worked in embedded f... (by Cubbi)
Need to fix my minimum function
 
Hello is a formality on all the post maybe putting it should help get replies. I have a function tha...
[2 replies] Last: You are the best. Thank you so much. =) (by Joeyisepic8)
by Alex A
How to break out of a for loop ?
 
Guys,is there a better way to get out of the function procedure when months==0, without using the br...
[2 replies] Last: c++ has an excellent goto statement and breaking out of nested loops u... (by jonnin)
Simplest if construction solution ?
 
HI, there is a thing what i need : ////////////////////////////////////////////////////////// i...
[2 replies] Last: I don't see a way around testing both conditions anded to the common e... (by jonnin)
by slixxz
DFA at run time
 
I am currently working on a program that will take a English description of a language and then use ...
[1 reply] : My question is how would i know how many states I will need? since th... (by lastchance)
May 2017 Pages: 1... 7891011... 14
  Archived months: [apr2017] [jun2017]

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