General C++ Programming - May 2010 (Page 7)

by wtf
Getting around rand()'s limitations.
 
Say if you wanted to hash the value from 2 different calls to rand() at different seeds, what would ...
[2 replies] Last: Take a look at this, and also tell me what you think of it: http://cp... (by m4ster r0shi)
Exceptions problem
 
Hi, i wrote this code and i can't understand why it doesn't work. Compilation works fine, with no er...
[2 replies] Last: Thank you :). Simply throw 1; and catch(int nr){} make, that all w... (by mtweeman)
Brackets by themselves
 
Hi, if I have something like this in my code: int main(int argc, char **argv) { int *p; { ...
[1 reply] : will the declared variable i be deallocated after the duration of tho... (by R0mai)
wrong dynamic array size
 
#include <iostream> #include <time.h> #include <conio.h> #include <windows.h> using namespace...
[1 reply] : On line 17 you delete a char* with no value. This causes undefined beh... (by Galik)
Character reading problem!!
 
I have a loop in my code, something like this: while(1) { char c=getc(); Sleep(50); run...
[4 replies] Last: thanks! (by thunder87l)
Center Alignment.
 
i wish to do an output like this~ Sample Run 1: Enter height: 3 * *** ***** Sample Run 2...
[1 reply] : Perhaps you're thinking too complicated. You just need to add an appr... (by Athar)
by indigo
queue not working as expected
 
Hi everybody, my simplified console application code: ... queue<char*> pQCh; ... void thread...
[4 replies] Last: Thank you guys, it helped much :) I used string for queue type and it... (by indigo)
my sorting algorith
 
Hey guys, while in my algorithm and data structure class, we where learning about sorting algotithm,...
[9 replies] Last: Indeed its worst and best case complexity appear to be O(n). Howeve... (by M364M4Ncro)
a shallow copy constructor
 
Say I have Class1 and Class2 and I want a shallow copy constructor for Class1. Class1 has a member v...
[2 replies] Last: I suppose an alternative would be to make the class2 pointer indepen... (by guestgulkan)
permutation of array[i][j]
 
now i know permutation become n*(n!) complex so I'm not trying to perform large permutations (just y...
[2 replies] Last: you know its sad...i had to look at that page 100 times and I never th... (by liltimtim)
fast comparisons of strings
 
I have to compare several times two vectors of strings. Each string contains "0", "1" or "2". Ex:...
[12 replies] Last: Thank you so much m4ster r0shi!!!!!!!!!! Indeed, the idea being calcul... (by courtiol)
linked list vs array
 
Hi, I just wondering the advantages/disadvantages using a linked list and an array. I have to ...
[2 replies] Last: Thanks for the link. I figure out the standard vector class uses ar... (by jesperd)
tempalte as the overloaded conversion operator
 
class WIDE { ... template <typename A> operator A () { A a; ... A::static_mem...
[1 reply] : Why do you have to do this -> template <int x, int y> class NARROW ? ... (by m4ster r0shi)
OpenGL with SDL Blitting
 
Hey All, So i'm using SDL on top of previously created GL images (using glVertex). I have everyth...
[1 reply] : try adding SDL_Flip(getSurface()); to the end. not entirely sure i... (by Azriel)
Run time errors
 
After compiling my big integer class, using list base description, without any error, then I run the...
[no replies]
by panski
Infix to Postfix
 
Hi I recently just finished my program about converting Infix to postfix, it runs okay when I input ...
[no replies]
loops
 
Can anyone just explain to me why this loop produuces this outcome. Outcome (bolded) j : 0 3 6 9 ...
[2 replies] Last: thanks (by gnwillix88)
Trying to pass input string to dynamic array
 
The visual studio c++ program compiles and build without errors. When i try to run it from the black...
[4 replies] Last: It worked. Thanks Albatross, your a lifesaver. (by computerpublic)
by shirin
composition
 
Write a C++ program that will find out the total amount of a customer's bill according to the items ...
[6 replies] Last: Thank you so much!!!!!!!!!!!!!!!!!!!!!!!! Its very helpful. (by shirin)
by Azimer
add a win32 program to an asp.net web app
 
I have a working hangman program that outputs to the windows command prompt. What i would like to ...
[no replies]
May 2010 Pages: 1... 56789... 22
  Archived months: [apr2010] [jun2010]

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