General C++ Programming - February 2015 (Page 9)

uploading and downloading files in a program
 
I understand I can do this via a php file on a server, but I don't understand how I can communicate with the php file from c++ code on my machine. Is there some...
[1 reply] : Look into libCURL. Amazon is not the only company offering cloud serv... (by LB)
by steleb
if statement does not make correct decision (1,2)
 
Hi i recently wrote a "Tic Tac Toe" console game, and i seem to have a problem in my winning conditions, as when it checks if the player won (should have won) i...
[20 replies] Last: In int CoreLogic::logic() , you create a local UserInterface object... (by cire)
std::vector and derived classes
 
Sup guys, I've created a base class called "SDLGameObject". The "Player"-class and the "Enemy"-class are derived classes from SDLGameObject. There will be lo...
[9 replies] Last: But my programmer english is messed up ^^' Thanks to the two of you, ... (by HalfNOoB)
SHA-3 implementation
 
Hi, I'd like to implement SHA-3 using C++. I was unable to pull the paper having the algorithm from NIST. Would anyone here happen to know where I can find it?...
[4 replies] Last: Thanks CG. Very helpful info. Just in case others stumble across thi... (by codeman123)
Help understanding how shared_ptr's work?
 
In another post I was workig through using std::shared_ptr's in my program, but since this is specifically about how they work I figured I'd start a new thread....
[19 replies] Last: Right, here is walls_ std::vector<std::shared_ptr<Wall>> walls_; and ... (by wh1t3crayon)
Palindrome
 
Hi, I'm trying to determine the number of times I have to change each specific character in a string to make it a palindrome. You can only change a character...
[1 reply] : It looks like you just want to add/subtract the character values in th... (by LB)
by Jt253
Making your Own linked list
 
Hey guys, I have to design my own linked link class that will hold a series of figures and this is my program: # include < iostream> using namespace std; ...
[4 replies] Last: That made much more sense.. Thanks guys! Helped a lot! (by Jt253)
Help w/ Homework!
 
So we are learning how to build different types of functions... Only problem is our teacher is continuing to assign homework without teaching us in class!!(Scho...
[15 replies] Last: Line 23 calls a function that uses the random number generator (srand)... (by booradley60)
Time complexity
 
Hello there! Me and my friends are trying to understand an assignment about time complexity in c++. Can someone help us to understand which one of us is thin...
[1 reply] : It is of course n 2 *10: #include <iostream> // provides:... (by coder777)
by Dkob1
Reading name
 
Not outputting right, the programs supposed to let you enter a full name then tell you the last name and then ask if you want to continue(y/n)? #include ...
[13 replies] Last: Ok thanks very much got very frustrated trying to do it. (by Dkob1)
by toast9
Mutator Not working
 
I'm trying to set a bool in one class to false through another class. But no matter what I do the bool stays true. Why???? //this class sets the bool in i...
[9 replies] Last: Ah got it. Thanks cire. I added the & in the function definition and s... (by toast9)
operator overloading help
 
Hi I am creating a class called time and we've had to do operator overloading for <, > , <=, >=, ==, !=, ++, --, >>, <<, * , +, and -. Well I have done and e...
[8 replies] Last: you could just convert the time back to seconds, subtract and then rec... (by Gamer2015)
Trouble with namespaces and pointers
 
I am trying to compile the files below. The `PosLin.cpp` contains the `SurTriAUTO` and `getSphere` functions below. Although they are similar, I am not getting ...
[no replies]
Struggling with Class Inheritance.
 
I am having some serious issues with class inheritance. I am trying to make a MoneyBag class inherit from a class called bag. This will not work. I get an error...
[2 replies] Last: Yanson thank you for the help. That fixed it. Sorry about the format... (by emperorguam)
PLEASE HELP
 
Hi I am creating a class called time and we've had to do operator overloading for <, > , <=, >=, ==, !=, ++, --, >>, <<, * , +, and -. Well I have done and e...
[1 reply] : Please do not post more than once: http://www.cplusplus.com/forum/gene... (by LB)
by tmason
Class Object Initialization Question ...
 
Hello, I have a quick question that arouse out of curiosity. Suppose you have a class like so: class SimpleClass { public: SimpleClass(); ~...
[7 replies] Last: Thank you for the examples! Good to know this stuff :) (by tmason)
Inheritance using Base Method with other name?
 
Hey guys, I have 2 classes with a Function with the same definition (both inherited from the same base class) and in my derived class I derive from both of tho...
[6 replies] Last: Thats very important to know, thank you! (by Gamer2015)
Why isn't my code working? PLEASE HELP
 
I am currently working on improving a simple project I did for school. This program reads data out of a file called "Order.txt" and outputs information to a fil...
[2 replies] Last: using namespace std; is bad practice for multiple reasons. One of th... (by LB)
by Gyiove
QueryPerformance like function for both linux and windows.
 
Hello everyone! I have been working with my game engine what must be run both in linux and windows and after trying to compile things on linux i discovered t...
[1 reply] : Have you looked into the C++11 <chrono> library? http://www.cplusplu... (by LB)
Moving from one co-ordinate to another
 
I have a character at a co-ordinate, say (3,4) for example, and I need to get him to (10,15). I would like him to move one block every tick or half a second, so...
[3 replies] Last: theres no obstacles, and its a grid, so only integer x and y values. s... (by LMoroney)
February 2015 Pages: 1... 7891011... 26
  Archived months: [jan2015] [mar2015]

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