General C++ Programming - February 2014 (Page 30)

A* search and Greedy search
 
Hello, I was to make a program that can do either A* search or greedy search. I got it mostly done, but the output I get is weird and I can't seem to find a wa...
[1 reply] : Here is the following output: Enter the starting city and the endi... (by crimsonzero2)
Code blocks and MySQL
 
Any good references to explain how to use a MySQL database and server with a C++ program? I already hooked up the connection between the two but I don't have th...
[1 reply] : I had to set this up for someone a few years back. This is the link w... (by closed account 3hM2Nwbp)
How to use a string as a delimiter using getline function?
 
How do I use a string in place of a character in the function getline? For example, getline(infile,lines,'}'); This works fine, but I want the de...
[1 reply] : Not simply, no. The best way would be to write a getline() variant tha... (by Duthomhas)
Dereferencing Vector Issues,
 
Anybody have enough experience with debugging to figure out why I am getting an error with the comPlayer class having the cards dealt to it and displayed in ...
[2 replies] Last: Omg, thank you. I can't believe I was closing my loops before they ... (by carpalTunnel)
Any good 3D game programming tutorials?
 
Hello I need to learn 3D game programming. I learned the basics of C++ from this book http://goo.gl/aH1zTB and, I want to learn game 3D programming now. So I...
[1 reply] : No need to repost this question, a discussion is in project in another... (by Avilius)
counter program
 
I have to make a program that counts lines of code and a separate counter that prints out each object name along with the total number of methods and object lin...
[6 replies] Last: That post was great. Also made me realize how much more difficult this... (by cppnoob25)
Finding number of lines between two specified characters.
 
I am looking for a way to correctly count the lines between two specified characters/strings in a file. Here's the part I need work on: getline( fil...
[2 replies] Last: Thanks JLBorges, that works a lot better than what I came up with afte... (by geekytom777)
& and % operators
 
The & operator is too confusing. When I write a copy constructor I write it like this class Example { public: Example(); Example(Example&) //what does...
[8 replies] Last: Thanks guys. ninja'd by firedraco :D funny. (by Gameman)
by thsq
Elevator problem with input from file
 
Hi, Can you please help solve this problem : http://ge.tt/1rucGkI1/v/0 Thanks
[no replies]
Help with a function
 
Hello I am almost done with this homework assignment I am just really confused about the output that I am getting. Any help would be greatly appreciated!!!
[1 reply] : You aren't returning anything from your equSolver function so "secondS... (by Hippogriff)
problem with virtual functions and -Weffc++
 
I'm writing my first class that uses virtual functions. Here's my parent function declaration: //************************************************************...
[4 replies] Last: hmmm... okay, thanks for these notes. I'll have to think about this a... (by Gorlash)
I have a constructor initializing member data and I have a member function to set values
 
Im using a constructor to initialize member variables and I have a member function that set values I was thinking I could use either or but when I call set fun...
[no replies]
Function Help
 
Hello! So here are the code instructions: In this exercise, you will write a function getIdFromFile that takes three parameters (a C++ string representing a...
[1 reply] : How would I implement the specific format for the 1000 unique usernam... (by CodeGazer)
methods and objects
 
What is a method and what is an object?
[8 replies] Last: Thanks Mikey, that clears things up. Also my initial code problem s... (by cppnoob25)
Generate Armstrong numbers between two numbers
 
Hello guys, i want to generate Armstrong numbers between any two numbers either it is a 4 digit, 3 digit or 5 digit? There is a program written a to check...
[no replies]
Throwing std::string
 
Is there a good reason why people would throw a std::exception* instead of std::string? void f(){ throw std::string("Error Message"); } int main(){ try ...
[1 reply] : std::exception was never intended to be thrown. What people are expe... (by Cubbi)
Improved euler for movement not working
 
I have attempted to implement improved euler for movement of my character in a 2d platform game. When i press right the character moves right an but then slows ...
[no replies]
Making Data Structures for a rectangle and square in opengl, c++
 
So this makes an output of the head (a square), and the leg (rectangle. How do I make my points into a data structure in the shortest yet simplest way possible?...
[10 replies] Last: Does this help you: struct Vertex { float x, y, z; }; struct My... (by ajh32)
<> Two-Dim array help.
 
I have to create a program that calculates the final scores per diver, who each get five dives. I have to include the difficulty level when figuring out this sc...
[11 replies] Last: code reuse. min_element(), max_element(), sum() are useful functions ... (by ne555)
REVERSING A STRING
 
A few days ago, someone was asking for a C++ code that can Print the words in a string in reverse order. i.e if input is : good morning how are you then the o...
[12 replies] Last: mastery of the STL doesn't indicate mastery of C++. i didn't say t... (by NPcomplete)
February 2014 Pages: 1... 282930313233
  Archived months: [jan2014] [mar2014]

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