General C++ Programming - February 2012 (Page 36)

IStream CopyTo
 
I need help with the CopyTo method of ComTypes::IStream I have the following code and there appears to be an issue where the original stream is left open. Can...
[4 replies] Last: [quote=Dontmindme]using .net is not option in this case You are usi... (by closed account o1vk4iN6)
2D Platformer Game
 
Hi, I'm wonder how I could make a 2D side scrolling Game. It would be really nice if somebody could point me in the right direction. Thanks, I really appreciate...
[8 replies] Last: If anything, it's allegro_init(); by the way. (by hanst99)
class programming
 
Hello everyone I had a question and I'm stumped. This is a question I need help on and so far what i have down i'm getting errors. Design a class for a wi...
[1 reply] : Well your off to a good start. I will say a few things about your var... (by clanmjc)
developing desktop application
 
Hi, I am trying to work out an approach to developing a desktop application that would play movies, games and various flash material such as flash games and ...
[1 reply] : The player / user interface would need to be written in a 'portable' ... (by coder777)
printing from a vector
 
Hi guys, I have recently created a card class like this: class Card { private: string suit; int value; public: Card()//default c...
[11 replies] Last: #include "class.cpp" #include "deck class.cpp" I would refactor the n... (by clanmjc)
decrement
 
I need to decrement a number by 2. my code goes something like this: " int won=18; ............. (won-=2); gotoxy(60,18); cout<<"Points: "<<w...
[12 replies] Last: Thanks a lot for helping !!!! (by Mario Saliba)
Getting wrong answer !
 
Here is the question :- Problem 1: Railway Catering Contracts, (K Narayan Kumar, CMI) The government of Siruseri has just commissioned one of the longest and...
[5 replies] Last: Thankyou Vin , but i have got the dynamic solution to it (but at the c... (by Maggi Iggam)
Functions an return values
 
I have been working on this program to calculate the Kinetic Energy of mass at velocity. I am having problems with my return value from the function to the main...
[5 replies] Last: As Roberts said, you need a variable to receive the returned value fro... (by Lodger)
NEED HELP FAST!!
 
In this program im writing I need to be able to print to the screen "NO REAL ROOTS" if my quadratic has a negative descriminant. This is what I have so far will...
[9 replies] Last: Right, got it. There's two problems here. Lets address this first: t... (by MrHutch)
by swp
recursive binary tree
 
hey guys, ive got this binary tree program meant to just take in numbers, and output them inorder, but i cant seem to get the print function to work, everything...
[1 reply] : You have the variable name 'tree' as a gobal variable and several time... (by coder777)
Adding an entry to an array
 
I'm writing a program that will allow the user to load an array from a file, and then either print the contents of the array unsorted, print the contents sorted...
[1 reply] : The easy way is to use a std::vector. (by modoran)
Inheritence
 
Nevermind, I think I have it now.
[no replies]
by PL285
accidental post
 
accidental post
[no replies]
by rucafe
3D vector
 
I am trying to initialize a 3D vector in my main program. I am trying to it like this: int depth = 600; //x int height = 600; //y int width =...
[3 replies] Last: Thanks hanst. That seems to work. (by rucafe)
How to create a similar program
 
I've been using this website to calculate stuff but I want to create my own. How could I create something similar to this: http://www.wolframalpha.com/input/...
[1 reply] : From the fact that you ask this question I deduce that you can't. (by hanst99)
Hash tables vs arrays
 
Hi, I am a little confused with direct addressing in arrays vs using hash tables with chaining. eg: let's say 900 items stored in 900 indices in a direct addre...
[4 replies] Last: Thanks for that, I forgot that we can use strings and use a character'... (by closed account 4ET0pfjN)
STL list problem
 
I am trying to solve a problem "find if a string has all unique characters", in different ways possible. One way i thought was, i could store the characters ...
[8 replies] Last: wow, thats also a nice way... That too will take nlogn time. Thank y... (by Harry Potter)
Classes and libraries
 
Hello guys, I created a class (.cpp e .h) and I am having problem to use library string on the class. I have on .cpp: #include <string> //then v...
[1 reply] : std::string myString = "myString"; (by Peter87)
string & char
 
cannot convert 'std::string' to 'const char*' for argument '2' to 'int sqlite3_exec(sqlite3*, const char*, int (*)(void*, int, char**, char**), void*, char**)'...
[3 replies] Last: OOHH!! now I remember Instructor/teacher was saying something like thi... (by mahinkhan22)
Ambiguous call to overloaded function (constructor)
 
I don't understand where the ambiguity is. Example.cpp: struct A { A(); A(char); }; A::A(char c = 'A') {} int main() { A a; } Error message from Vi...
[5 replies] Last: struct A { A(char); }; A::A(char c = 'A') {} int main() { A a; }... (by Mathhead200)
February 2012 Pages: 1... 3435363738... 43
  Archived months: [jan2012] [mar2012]

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