General C++ Programming - June 2011 (Page 18)

Challenge: Multithreaded KFY/Durstenfeld Shuffle? (1,2,3)
 
in a single-threaded app, the algorithm is simple: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modern_method making this algorithm multi-threade...
[50 replies] Last: log 2 (2 32 !) = log 2 (2 32 ) + log 2 (2 32 -1) + ... + log 2 (1). T... (by hamsterman)
Custom Build Actions?
 
Please consider a beginner/intermediate question for which searching Google has provided me no results. I am attempting to write a program that compiles a scrip...
[4 replies] Last: Ah, my bad. I misunderstood the problem. This is happening to me a lot... (by Computergeek01)
Problems overloading the subscript operator
 
Good Afternoon, I have overloaded the subscript operator in a custom class as below: template<class T, class I = int> class Indexed_Object { publ...
[6 replies] Last: Hi - thanks for the reply. I was kinda hoping for a solution that didn... (by Philip Lee Bridson)
by isnork
A little question about &
 
Hi, I have a little doubt with this: Whatever y(...); Whatever& x = y; With that code, x will act as a pointer to y?? Thanks in advance!...
[9 replies] Last: I think that I get it now. Thanks to everyone! (by isnork)
Deck of Cards Class
 
I just put this together a little while ago just to see if I could. Let me know if you have any thoughts / comments and what you think of it. This is a class I ...
[5 replies] Last: I know SFML pretty well, so that won't be a problem. I am more interes... (by TheNoobie)
Finding the location of a char in a 2D array
 
I create an multi dimensional array of dimensions 5 X 5. I have the first character as, say P. all other's are X. Now I print the array as a grid and I want i...
[6 replies] Last: Ah! Now I understand! Thanks a lot!! (by Nisheeth)
guys its not working for me
 
im suppose to do this: Write a program that reads 3 integer values representing the integer coefficients of a quadratic polynomial. The first number represe...
[2 replies] Last: //Um... This: // bool hasRealRoots ( int unita, int unitb, int unitc... (by Mathhead200)
by HenriK
How does this work <getting the length of static array>?
 
Hi, I was messing around with arrays & vectors and found a way how to get the length of an array (static array, no vectors). This piece of code I found jus...
[4 replies] Last: The sizeof operator when applied to a function gives the sizeof t... (by guestgulkan)
system("C:\") help
 
im making a program that opens 3 or 4 programs on my computer. so i use this setup: system("C:\\FILEFOLDER\\FILE.exe") system("C:\\FILEFOLDER\\FILE.exe") ...
[8 replies] Last: I've not used that function in ages, man, been so long since i cpluspl... (by Mythios)
getline
 
hi,i'm reading from a file by using getline(),now depending on my logic i have to go back exactly no.of characters read by getline so i can read that line agai...
[2 replies] Last: sounds like the OP wants to put the line back into the buffer you can... (by kfmfe04)
static initialization order fiasco (1,2)
 
are there any tools that can detect this type of bug? what do you personally do to avoid these types of problems? edit: change the title of the thread to ...
[20 replies] Last: @webJose - to catch SIOF in action, you need to put classOne and class... (by kfmfe04)
Searching for material to learn Image Handling
 
I just recently started a project that involves a small amount of image handling, but, I am relatively new to programming (about 2 years). This project is for m...
[6 replies] Last: *Facepalm* I can't believe myself. I had tried reading it in as ints, ... (by RipStikGuy)
Device detection C++
 
Hi, I wanted to know something about callback functions. Glut provides default function for identifying mouse movement void glutMotionFunc(void (*func) (int...
[no replies]
by JayFab
Different projects, same language?
 
There are several different types of projects (Win32, MFC, ATL, C++/CLI, FORMS) what do all of these mean? Are they still the same C++ language that I'm learnin...
[2 replies] Last: Yeah, go to the General section and use the Empty project. Then, you c... (by LB)
by LB
Strange error on one code, but not another?
 
I have a function, defined like this: void AddFormatElement(const string& Name, const FormatElement& New) { //code } FormatElement is the base class ...
[2 replies] Last: Oops! I was using public inheritance originally, but I had to rewrite ... (by LB)
Loggers!
 
Everyone needs a little logging every now and then. Anyone else care to share their design? ///@file Logger.hpp #ifndef __LOGGER_HPP_INCLUDED__ #define __LO...
[3 replies] Last: I have been writing my log for ages (it supports Xml and plain text fi... (by anonymous23323124)
by xcrypt
Call by Ref VS Dereference operator ?
 
Why do we need Call by reference? Compare Code1 with Code2. Code1: void MakeNice(string& nameRef) { nameRef = "*** " + nameRef + " ***"; } int _tma...
[2 replies] Last: Hi there, in your example it doesn't make much difference. But there i... (by Philip Lee Bridson)
[Help]Dll injector
 
Im making a program somewhat like the program winject, just a simple dll injector. This is the first time I have done stuff with WriteProcessMemory, VirtualAll...
[3 replies] Last: from msdn PAGE_READWRITE 0x04 Enables read-only or read/write a... (by closed account zwA4jE8b)
help me plz !
 
output on screen using for loop 1./ 222222 2222 22 11 1111 111111 thank you !
[1 reply] : Please refer to the link below for your solutions. Notice: This p... (by closed account zb0S216C)
by xcrypt
Question about objects/pointers and stack/heap
 
Hi, I'm studying 1st year game development and we have to program some stuff in C++ To make objects, so far we have always been taught to work with pointers. f...
[4 replies] Last: Intellisense can be a bit odd at times, sometimes you have to wait for... (by LB)
June 2011 Pages: 1... 1617181920... 28
  Archived months: [may2011] [jul2011]

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