General C++ Programming - April 2013 (Page 35)

Why use this???
 
Why use va_start, va_arg, and va_end in order to make a function accept a variable number of arguments? Cant it be done with a simple pointer? I tried but...
[8 replies] Last: i meant that you dont have to know the number of variables when writin... (by closed account Dy7SLyTq)
Should this have a destructor, and should I free dynamically allocated memory? Any suggestions?
 
// Assign dynamically allocated derived class objects to base class pointers // and use polymorphism to display output based on the type of the object. #...
[3 replies] Last: At this point no you do not need to worry. The memory will be cleaned ... (by Zaita)
by vkt420
help with reset function
 
Not sure how to define my reset function. My reset function should return NumberGuesser to the state that it was in when it was constructed. #include <...
[1 reply] : You need to put the game in to a while loop instead of your for loop a... (by Zaita)
by kb123
Double.
 
Hey everyone I am trying to write a c++ program and i will like to define r as r=pow((1+(R/100)),1/365)-1. R is variable we type in. But my teacher has wr...
[3 replies] Last: It would be simpler to put a .0 at the end of the numbers, as this wou... (by LB)
PolarSSL SHA512 Wrapper - Differing hash lengths.
 
Hi everyone, I'm trying to write a little C++ wrapper around the PolarSLL SHA-512 / 384 implementation, the source code of which you can view here: https://...
[3 replies] Last: Hi, Thanks to Paul's input I managed to solve the issue, I include th... (by closed account o3hC5Di1)
Problem Merge Sort
 
I am having a problem with my merge sort. whenever I try to call merge sort on large numbers say n=10000000. It gives an error. It works fine for small numbers,...
[1 reply] : You already have two topics posted: http://www.cplusplus.com/forum/gen... (by LB)
Windowed Mode Using C++ & Free GLUT ....
 
I am working on a game project using c++ and free glut and need to create a windowed mode in order for the game to be supported on machines with integrated grap...
[no replies]
Read complex txt file
 
Hi, I have to txt file that I want to read it and arrange the elements into several vectors. The txt file looks like: type title year nu...
[1 reply] : Read whole line into string. If string contains tabs, it should have f... (by keskiverto)
handling data types as inputs
 
I 'm fairly new to C++ programming. I wanted to accept a datatype as an input. I've seen something similar while working with the <queue> library. when defi...
[1 reply] : std::queue<typename> is a template. It tells the compiler how to buil... (by pogrady)
For Loops
 
I am a beginning C++ programmer trying to figure out how what to include in the test update section of a for loop that prompts the user to enter temperature in ...
[19 replies] Last: What you need is to enclose your code in code tags. Highlight your co... (by doug4)
Copy Constructor not Called in Virtual Inheritance
 
I have the following classes and 'dreaded diamond': A / \ / \ B C \ / \ / D | | E Classes B & C both inherit from A using pub...
[8 replies] Last: Wow, talk about going the extra mile. Most derived class it is. Thank... (by Blank Reg)
Unresolved external symbol errors
 
I'm doing a homework assignment where I have to calculate monthly interest from a starting balance. I've pulled several sections of the code from various parts...
[12 replies] Last: I think I got it. Thanks for steering me in the right direction. (by TheKingLear)
by bewfy
Simple Function, just need help with concept
 
Here is the problem statement. // Overloaded the relational operators bool operator==(const BookType& otherBook) const { // Overloaded operator== ...
[2 replies] Last: How BookType class is defined? If it has field like std::string ISBN ... (by MiiNiPaa)
by xsesx
Problem with .h file
 
Error 1 error LNK1123: failure during conversion to COFF: file invalid or corrupt c:\Users\fred steinman\documents\visual studio 2010\Projects\Date Class 2\Date...
[2 replies] Last: I researched the error and found a solution. Properties -> Linker(Gen... (by xsesx)
by hirax
Advice/help please
 
hi, i have this assignment to complete but i'm a beginner in c++. i would really appreciate some form of advice/direction to how i could tackle this problem. ...
[2 replies] Last: noted thanks :) am i right on the right path believing that i have to... (by hirax)
by Haze
Data Base
 
I have to create a small data base for a shop. One of the functions i am creating is taking a customers ID and scanning that through a text file and to print ou...
[2 replies] Last: ok cool thanks im not too sure on this way tho. What is infile? and fi... (by Haze)
HELP PLEASE!
 
I have this Homework Problem that I can't figure out. Here it is: Revise additem()member function from the LINKLIST program so that it adds the item at the en...
[11 replies] Last: Not calling you dumb or anything with this link, but check it out. Mos... (by topherpunch)
by xsesx
Problem displaying month names from class
 
I am having trouble associating the month names with the month numbers. When the program runs, it should output the date in three styles. Also I do not know...
[7 replies] Last: The error you are getting is the string error. at the top of your code... (by topherpunch)
Good open source 2d RTS game?
 
I want to look at a good open source 2d RTS game to learn a bit. You guys know of a good one?
[2 replies] Last: Thank you, helpful peer! (by Austin J)
by Linzi
Designing Sudoku
 
Hello, i'm a beginner in C++, still learning the basics, please i'm trying to design Sudoku and write a program for it, however i got stucked in trying to get m...
[2 replies] Last: yes it is, it automatically solves sudoku puzzles when it runs but i s... (by Linzi)
April 2013 Pages: 1... 3334353637... 53
  Archived months: [mar2013] [may2013]

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