General C++ Programming - April 2014 (Page 15)

Need help with my base class
 
Hello all, I have an odd compiling error. My base class is all delcared and read to go. But I could not figure out how to get my sub classes inherit from i...
[10 replies] Last: Ok fair enough. ns std is not such a bad thing, but having everything... (by TheIdeasMan)
Segmentation Error when saving file
 
I have been working a while with saving and retrieve structs, and I still have not got it to work. I get Segmentation fault sh "${SHFILE} . I have search th...
[1 reply] : char *filep; // undeterminate value strcpy(f... (by nvrmnd)
CMUgraphics Sprite
 
I have this simple graphic package my teacher gave me (cmugraphics).I need to make a game(pokemon).I want to use sprites and a background but the sprites(pokemo...
[9 replies] Last: Thank you so much for the tip on Paint.net and Sfml. (by happygill)
Is it a good habit to use global variables in member functions?
 
what do you think?
[8 replies] Last: Changing non-const globals is a manifestation of the fundamental issue... (by JLBorges)
please help!!!!
 
OK SIMPLE CODE WITH AN ARRAY THAT I NEED TO DECLARE THE SIZE TO 16 AND OUT PUT A-P FORWARD AND BACKWARDS IN CAN ONLY GET IT TO WORK IF I DECLARE IT TO SIZE 17 B...
[6 replies] Last: I know what you are trying to do, it is just you seem hung up on pedan... (by TheIdeasMan)
Unpacking parameter pack with templated predicate
 
I'm trying to generalize the following (working) code: #include <iostream> #include <string> #include <cmath> int foo (int num) {return num;} int foo ...
[2 replies] Last: #include <iostream> #include <string> #include <cmath> int foo (int ... (by JLBorges)
Struct explanation
 
Hey, can someone explain this to me as I dont get the logic of it. Is this a struct within a struct? and the last struct is accessing the global variables? ...
[10 replies] Last: I coach people in C++ (particulary beginners), so if you'd like, email... (by Little Captain)
swap elements of vector
 
hello, i need to learn how to swap the first and 'mid' elements of a vector? can anybody help?
[2 replies] Last: im trying to figure out how to use this 'swap' function. it sounds lik... (by chiefsosa1)
Does not name a type
 
I have a class named backgroundObstacleManager that I created and another class Pit that have to interact with each other however I'm getting an error. //ba...
[2 replies] Last: I found a solution on stackOverflow. For anyone who might have this p... (by supperpiccle)
Code error
 
Hey, I need a little help. I had the program working until I used the switch statement and tried to put in a menu and now I have three errors. Could someone ple...
[1 reply] : choice is defined as an int , so in the switch statements it should b... (by wildblue)
Getting a value from object passing it to an array
 
I am writing a program for a poker game.. I created a class to get cards and create deck.. the problem I am having now is how to deal 5 cards to an array to ve ...
[4 replies] Last: Line 21: What is the purpose of this if statement? 0 is a valid value... (by AbstractionAnon)
by teslaa
winsock2 bind error
 
I have created a class which uses threads and sockets but I am having trouble as the bind function works fine if I do not include the <threads> package however ...
[no replies]
by Yagada
Whats wrong with my code?
 
I cannot seem to figure the error in my code. Basically, its suppose to take 2 arrays and sort them then print them out. Any help will be greatly appreciated. ...
[no replies]
by admkrk
Qt, reading file stream problem
 
I'm having a problem filling a vector from a file. Basically, it is adding an empty element at the end. I'm new to Qt and haven't worked with file streams much ...
[3 replies] Last: Hmmm, I couldn't find another way around it except to use readLine() w... (by admkrk)
by Subo93
Is there something wrong in these if statements..?
 
This program outputs only.. Enter number of new members:3 Enter the card type:Bronze Enter the Bill amount(Rs.):34532 Do you need to continue ?y Enter nu...
[2 replies] Last: Thanks.. (by Subo93)
by Kubani
Polygon
 
Stroustrup has said " Polygon is a Closed_polyline where no two line segments intersect " in PPP. Please look at this simple code: #include <Simple_windo...
[13 replies] Last: If you think the problem was a wrong tone of correspondence! so mail h... (by Kubani)
x86 BIOS chip reading?
 
After doing some research, I've found out that the BIOS chip is loaded at FFFF:FFF0 minus the BIOS ROM size (so F000:0000 with 64K, E000:0000 with 128K ROMS). H...
[no replies]
Function to read HEX and Print ASCII
 
is there a function or something that take HEX and print it's corresponding ASCII Character .. Here is my Code to take Character Array and Print it's HEX to...
[1 reply] : #include <iostream> #include <iomanip> int main() { int inp; ... (by MiiNiPaa)
Is this dangerous or bad code?
 
Hi All, I'm trying to do something that someone told me might not be a good idea. I'm hoping I could get a few opinions please... :) I'm trying to build ...
[4 replies] Last: Wow. Some great explanations there. Thank you for pointing me there... (by Detnator)
Having trouble with html conversions....
 
Hi, so i've been given an assignment which asks me to simulate traffic on a road, the best output would be if there was a road with two lanes going in different...
[no replies]
April 2014 Pages: 1... 1314151617... 41
  Archived months: [mar2014] [may2014]

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