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

Check wheter CPUID is supported
 
I am trying to verify if the CPUID instruction is supported by the processor. I have this function that sends an assembly code to the processor: BOOL Support...
[3 replies] Last: Thanks for the link. Anyway, I suppose that I must find something that... (by alexbnc)
Pushing string array on to vector queue
 
Hi, I was trying to read a certain text file (using i/o redirection) into a string type array. My file looks like as such: NDISKS 3 DISKTIME 10 NBOX...
[3 replies] Last: I agree with cire , design looks suspect (by bluecoder)
Need help with Word Scrambler Program
 
The idea is to get a sentence of words and then scramble the middle letters of each word without altering the position of the word in the sentance. So for examp...
[4 replies] Last: For kicks.. and to expose you to a few new ideas: #include <sstream>... (by cire)
by wwybj
OpenCV: push image data into c++ vector
 
Hi guys, I'm using OpenCV to capture images from a camera frame by frame. When I get a new image frame(IplImage), I want to push it into a vector, then delet...
[4 replies] Last: Just a quick look at the OpenCV documentation, it looks like they're t... (by cire)
Inherit Class functions
 
Kindly assist. I would like to create class A and inherit datetype functions. to be able to call out like. A parent; A.Date.SetDay... //something like dat. ...
[9 replies] Last: That is exactly what i was trying to make clear... (by Jikax)
Alignment & Padding Articles Wanted
 
Can anyone suggest any good reading material regarding memory alignment and structure padding? Thanks Wazzak
[3 replies] Last: 'Inside the C++ object mode' by Stan Lippman http://books.google.com/b... (by JLBorges)
How to know when a user opens a file associated with my application?
 
I have a problem that I don't really know how to phrase, so I'll put it in an example: My application writes a file to a user's hard-drive, the user then, on...
[3 replies] Last: From Wikipedia: http://en.wikipedia.org/wiki/Main_function#C_and_C.2B.... (by LB)
Quicksort in c
 
I need to sort an int array in an efficient way. Has anyone here seen the quick-sort algorithm on wikipedia implemented in c++. I'm trying to get speed up in pa...
[3 replies] Last: What a site, I should have found it years ago. Darnit! Thanks a milli... (by liquidfuzz)
Population
 
I have to write a program based on population. In a population, the birth rate is the percentage increase of the population due to births and the death rate ...
[1 reply] : First write a function that takes P, B and D and calculates the formul... (by hamsterman)
unknown operator
 
hello everyone, can you tell me what does :: do?
[2 replies] Last: i got it. thanks = )) (by mishonacro)
Branch Coverage subset of Condition Coverage
 
Hi, is branch coverage a subset of condition coverage. I think it is b/c when we cover each branch (or edge), it doesn't mean we cover each truth value, is ...
[5 replies] Last: > I mean if we cover all branches, isn't that a good enough software m... (by JLBorges)
by rzaj
Help with "srand" for number guessing game
 
I have to write a program for a number guessing game. (Computer picks a completely random number between 1 and 1000, and the user then has to guess the number w...
[3 replies] Last: when i was trying to get the program to run i did this int playGame(... (by ui uiho)
end while function
 
I'm trying to end this while loop by hitting ENTER key, just so i don't have exit the program by closing the program. no i am not an idiot who doesn't know bre...
[1 reply] : It might be possible to do this with threads but other than that there... (by Peter87)
Getting information from another Application
 
Hi, I've been using cplusplus forums for a while now to help me with my codding that I'm learning and I figured I may as well make an account and ask some quest...
[5 replies] Last: you can always use a file to hold the info so when a value is over a n... (by ui uiho)
find low and average
 
I was having issues with the exchange sort, but finally figured out the issue. Now my find low and average functions are not working. Any ideas? void sortLo...
[no replies]
How to check my array for ""
 
I have an array of a typedef I made: typedef unsigned char PegType; When I debug the program, I see that some indices have the value '' , which I think is ...
[3 replies] Last: As a little note, " " is really a const string of text. By typing s... (by Need4Sleep)
2dimensional array game problem
 
Ive created a program that reads a text file into a 2 dimensional array and lets two player move around, after the turn ends i want the player to shoot across t...
[4 replies] Last: That was just a little logic i used for an early topic, was trying to ... (by Need4Sleep)
by jmrag
rand help!!
 
I'm trying to find an algorithm in order to pick a number from a range (5,x-5) while inputing the x.. But i really don't understand how rand works can you help ...
[1 reply] : Basically: rand() % 10 + 1 With this you are getting a number fr... (by Aikon)
by rzaj
New to Functions, Help is Appreciated
 
I have to write a program that prompts the user to enter a size for a box to be displayed (# of rows between 3 and 20, # of columns between 3 and 60, and a char...
[4 replies] Last: Thank you for all of your help, I was able to get it to work. (by rzaj)
by jwings
Why use "friend" key word when overloading operator<<?
 
I am curious about using friend function... After reading some books, it is always suggested to use "friend" when overloading operator<<. Why do we have t...
[7 replies] Last: ! was just trying to say - that at first you may be tempted to overloa... (by guestgulkan)
February 2012 Pages: 12345... 43
  Archived months: [jan2012] [mar2012]

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