General C++ Programming - April 2011 (Page 11)

how to find a memory leak?
 
hi all! I am creating a quite big project and I noticed that in some particular situations there are small memory leaks... I am calling many malloc, free etc...
[12 replies] Last: I guess you really do learn something new everyday, never knew it. T... (by Veltas)
Classes
 
Can someone give me a layout of how to go about coding each functions please? #ifndef CCC_EMPL_H #define CCC_EMPL_H #include <string> using namespace...
[7 replies] Last: http://cplusplus.com/doc/tutorial/ http://cplusplus.com/doc/tutorial/... (by closed account zwA4jE8b)
Adding two arrays to temp array, what's wrong here? (1,2)
 
I'm trying to a add two arrays of chars together into an array called Temp. The second array leaves off where the first ended so all the contents are together i...
[27 replies] Last: Like in the example, only that I don't usually write small theory into... (by closed account 3TXyhbRD)
Storing and using large integers.
 
I am currently doing some of the problems on projecteuler.net. Right now I am on problem 13 and having difficulty using the 50 digit numbers which I am required...
[13 replies] Last: @RAWBERRY It looks like the method I posted was incomplete. The while ... (by closed account D80DSL3A)
Insert NULL in midle of string
 
How can I insert \x00 or NULL into a string? If I use: char sends ; strcpy(sends,"\xFF\xFF\xFF\xFF\x6D"); strcat(sends,ip); strcat(sends,":"...
[19 replies] Last: Thx a lot Athar. Is work fine now. I appreciate that you are wasting ... (by mircea213)
Unions
 
I want some example on unions. How can i create union with switch_type attribute. And how can i initialize that variable. i want this program in c++ Thank y...
[5 replies] Last: IDL = I nterface D escription L anguage IDL files are to do with... (by guestgulkan)
MergeSort
 
I need to derive a MergeSort program from some given Pseudocode and implement it into a given program code. Now, I tried my best, but it's not doing, what it's ...
[2 replies] Last: [co de] "Please use code tags" [/co de] The divide par //sort le... (by ne555)
Dynamic Array Of Dynamic Objects
 
I keep getting all kinds of errors, I have an assignment where I need to convert a Java program into c++ and the assignment's requirement is I need to have a dy...
[8 replies] Last: workin on it, haha, thanks for everyone's help! (by cjames9001)
class linking problem
 
I am getting some errors in my program while trying to link two header files for my program and don't know why or what they mean.. Here are the errors: - er...
[4 replies] Last: Still getting the same errors (by ashworcp)
overloaded assignment operator and different data types (1,2)
 
I have another question about assignment operator overloading. Let's say I have a class... class S { int a, b, c; public: <other stuff> } S...
[29 replies] Last: Simeonz: on the chance that you're still reading this, I tried impleme... (by mzimmers)
Direct3D 9: CreateDevice( ) Failing
 
As stated in the title, CreateDevice( ) continues to fail when called. My codes is lengthy so it won't be practical to post it here. However, I can post the c...
[4 replies] Last: I did initialize params with: ZeroMemory(&params, sizeof(D3DPRESENT... (by closed account zb0S216C)
help with some C++ topics?
 
Hi, I've been going at C++ for a couple months now, and only understood it for about half of the months. I'm pretty good on most things, like arrays, string...
[18 replies] Last: Can you give me some chapter names of what you have studied so far in ... (by closed account 3TXyhbRD)
Template Queue Class Program
 
im working on a program dealing with template, class, and structs and i need a little assistance on moving forward with this program.. i have below my code and ...
[3 replies] Last: You have not asked any questions yet. Please read the article linked ... (by PanGalactic)
How i can store a variable permanently.
 
Dear all, I developed a project (which have several classes) in VC++, when it execute gives some output. I would like to store these results to use it for ne...
[1 reply] : Every group of relating tasks having enough complexity would worth put... (by userulluipeste)
Randomizing a Quiz (1,2)
 
I have made a quiz with 10 questions [I haven't posted the code since it is very long, but I will do so if it is needed] The program gives the user a question,...
[29 replies] Last: Of course! I didn't think of that. thanks a lot. (by Nisheeth)
by gillid
Selection-Sort Algorithm w/ Strings
 
EDIT: I figured out what I was doing wrong. I'll post a similar solution as a reference for anyone that might be having trouble with this in the future. The ...
[1 reply] : string a; string b; if(a > b) cout <<a; else if ( b > a) cout << b... (by tkauffman2)
. (1,2)
 
......
[20 replies] Last: . (by mircea213)
need help in getting file directory
 
what is the problem of my program? why not work? argv is ../bin #include <windows.h> #include <stdio.h> #include <iostream> #define SIZE 128 using namespa...
[3 replies] Last: You could start by stating what the program is supposed to do and what... (by kbw)
Bitmap Collision Detection with Allegro5?
 
I'm learning Allegro for fun and I'm trying to write a simple Pong game, but I'm not going to get much accomplished if I can't figure out how to detect a collis...
[no replies]
by krityx
STL map question.
 
Hello everyone, I have declared a map : map<char,int> mymap; and when I say map["asdfsd"]=5; it throws an error : 58: error: invalid conversion from `c...
[4 replies] Last: Why aren't you using std::string to hold strings? (by kbw)
April 2011 Pages: 1... 910111213... 37
  Archived months: [mar2011] [may2011]

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