General C++ Programming - November 2011 (Page 27)

by fafner
Extract n bits from value
 
I'm trying to implement an algorithm that demands that I take the last 32 bits from an int. I've read up on the bit-wise operators I wasn't familiar with before...
[4 replies] Last: Ah, clever:) That's exactly what I need, thanks you:) (by fafner)
by jimctu
string parameter issue
 
Hi everyone...I´m having an annoying issue with strings... I want to get a substring of a string that I receive as a parameter, but I keep getting a SIGILL er...
[4 replies] Last: changed the sprintf to string concatenation and it worked. thank you g... (by jimctu)
by iPlus
I need a tutor! (please read)
 
I don't need a tutor to teach me c++ but I need him to give me assignments or projects. And help me with those projects if possible. Please just let me know i...
[13 replies] Last: Hey... i hav been doing C++ for 4 years i hav learnt it, hav taught it... (by Prachi Gupta)
Constructing Pointer to Array of Classes
 
So I was making my large program, and it has a pointer with dynamically allocated memory for an array of 8 classes(for now). The class that's being pointed to h...
[10 replies] Last: Oh by saying I'm totally good there, I mean I understand the implicati... (by Pluto is a Planet)
Unable to play first 8ish seconds of wav with fread/WASAPIs
 
I'm using classes I developed after looking at the 'WinAudio' sample. While that example works fine, as do earlier builds of my application, with my latest buil...
[1 reply] : The issue was I had removed the sleep periods in the playing thread. T... (by Joe Fox)
temperature convertion
 
To convert temperature written in Fahrenheit to Celsius you subtract 32,multiply 5 then divide 9 To convert Celsius to absolute value you add 273.15 Write a p...
[1 reply] : We're not here to write your program for you. You have to come up with... (by hbjgd)
Measure execution time accurately
 
Hi all, I am running some c++ code on linux and want to measure the exact amount of time it takes to run this code. So far this has been working fine with...
[no replies]
by DC1123
Selection Sort
 
I don't know what declaration to use for a selection sort of an array. Its supposed to be a deck of cards (52 integer array) Here is the code: #include "Ca...
[2 replies] Last: I'm also confused. What exactly are you asking? and you're statement a... (by hbjgd)
help with a time and date program
 
Hi- I am really needing some help writing the following program; DIRECTIONS: Write a C++ program which will prompt the user for an int representing hours. T...
[5 replies] Last: Just a tini tiny better. You have declared variables input, hnumber, ... (by webJose)
using strtok
 
plz help me for this. i was trying to find similar words from two sentences string1 and string2.but i having problem with using strtok and strcpy together.plz s...
[2 replies] Last: 1. Remember to use code tags to properly format your code. 2. You sh... (by webJose)
Stream Location Input
 
Hello. I was just wondering, is there anyway that you can have youre user input the location of a file when trying to using a stream? Ex of what I want to d...
[2 replies] Last: int main() { ifstream instream; string file_location; cout <<... (by Duthomhas)
Help list c++
 
Hi guys. listar I'm doing a program in "c + +" and I need one method that show one student in relation of your course and its disciplines The function of the ...
[1 reply] : nobody help me? In http://www.4shared.com/file/uBXFY1Vo/SistemaAcademi... (by muttleydm)
Passing Images/Sprites to a function
 
I've been trying to write a Draw() function for my game to call and I'm not quite sure how to pass asteroidSprite into the function. I'm changed it to define th...
[4 replies] Last: Awesome! That worked great! Thank you (by jgeorge)
by iPlus
Advanced c++ Book Choice
 
Is the c++ book by the creator of c++ good? Any other recommendations.
[1 reply] : It is good. I also recommend a copy of the C++ Standard itself, ideall... (by Moschops)
Default Copy constructor: coping a value to array'index]
 
Hi I am writing a hashtable implementation and the defaul copyconstructor looks like this template <typename T, size_t MAX_HASH_SIZE> class HashTable { ...
[6 replies] Last: You have two problems: 1. You're trying to initialise a member arra... (by jim80y)
by foxy16
Hangman game
 
I made a hangman game for my homework assignment, and naturally it doesn't work right. Can somebody help in me in identifying the problem ? The retry function d...
[no replies]
A little help
 
So this is the beginning of a homework assignment using structures. as of right now, it does function. But when I repeat a Do loop, it requires an addition ente...
[1 reply] : Your program works fine without calling clearbuf() (and eliminating ... (by eypros)
finding RGB values for pixels on current frame (1,2)
 
Hi, I am about to start a little project where I apply filters on the screen outside my application. I think I worked out most of what I need to do but I can't ...
[20 replies] Last: Nevermind, I fixed it and it works brilliantly, thanks for all the hel... (by Zoefschildpad)
Help With Vectors
 
Hello everyone, As a high school student I've been working game in my spare time as a way of furthering my programming skills, however I recently ran into a ro...
[4 replies] Last: Thanks again! You've helped me tons. (by jgeorge)
deleting a vector of points
 
Hi all, following is the code I think will delete all the objects that the elements(pointers) in my vector point to and also the elements(pointers) in my vector...
[17 replies] Last: I think I should write an operator overloading function for an assignm... (by orchids16)
November 2011 Pages: 1... 2526272829... 47
  Archived months: [oct2011] [dec2011]

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