General C++ Programming - March 2012 (Page 6)

Any good list of exercises ?
 
I'm a Cpp programmer for years but now I just wanted to search is there anywhere around on internet a good list of exercises that could be useful in refreshing ...
[2 replies] Last: projecteuler.net has a ton. (by hulibarri)
Help with manipulating two chars at a time
 
Hi, I need to write an encryption function that's supposed to perform XOR on two characters at a time The encryption function given is: crypt(message) = m...
[1 reply] : My professor gave me hint, he said to work with the key K's low-order ... (by closed account 4ET0pfjN)
by gufide
variadic template use?
 
Hi there, I started to make a program using the factory pattern. The way it work it's we have the template function construct which allocate a pointer and re...
[3 replies] Last: Np, and thanks for the question. It gave me a reason to go read about ... (by mackabee)
SDL Application runs too fast
 
Hi all, My really bad SDL Program is nearing completion. I tested it on my faster main computer, only to discover that while it ran perfectly on my ancient, ...
[7 replies] Last: You know, in sfml the only line of code you'll need is SetFrameL... (by Need4Sleep)
reading *.mtx sparse matrix file C++ ,...
 
How to read *.mtx (http://math.nist.gov/MatrixMarket/formats.html#mtx) file into c++ in visual studio 2010 ?
[1 reply] : This should work. If your files don't strictly adhere to the format m... (by Stewbond)
by bmwboi
Question about a program
 
Hi guys, I'm new to this website, and fairly new in C++. As of now, I'm also trying to write a program for my class that spits out random numbers, and when t...
[12 replies] Last: While one or both numbers are odd Exactly. Your statement says "whil... (by shacktar)
by rucafe
Pointers: Use for speed enhancement?
 
Hello. I have a giant data base of numbers which is about 0.5 GB. The data has the following form with millions of lines: 119.744158 0.255842 0.500000 0.9...
[5 replies] Last: Use references when passing vector and be sure to call vector::reserve... (by mackabee)
Please help, class is incorrect.
 
Code: #include <iostream> #include <string> #include <ctime> #include <cstdlib> using namespace std; int damageDealt; char name ; char Action; ...
[1 reply] : Indent your code properly. This is a nightmare to read. Player::exp ... (by mackabee)
Urgent! Please help.
 
I am making a program that will calculate the surface are and volume of geometric figures, with C++ visual studio 6. The variable sora stands for surface are or...
[4 replies] Last: I apologize if the "Urgent" is undesirable, and i will make sure to in... (by znottaken)
Trouble with another program
 
I'm supposed to make a program that uses a vector with 20 values, and the first 3 are predefined num ={1,2,3}. The program is then supposed to then fill in the ...
[3 replies] Last: Making it somewhat simplier: #include <iostream> using namespace std; ... (by coder777)
Trouble with a program
 
I'm supposed to make one program that calculates the volume of a cone from the user input of a height and radius. It's also supposed to call a function to do th...
[6 replies] Last: 1/3 Both operands are integers so it will do integer division. The r... (by Peter87)
Having some difficulties with a C++ assignment.
 
I am needing help writing a c++ program that takes two variables, n and k, and calculates all the possible permutations from the number of choices, n, and the t...
[6 replies] Last: OMG! Thankyou so much! From that little bit of help I was able to cons... (by tigerlilycnm)
you know the secret or got lucky
 
It's a "guess the number game". i got it to work but the teacher said that it needs to be divided in to four separate functions or subroutines and I have no clu...
[3 replies] Last: This is spam if you don't see that. The C++ related text is copied fro... (by Peter87)
need help reading from a file
 
Hi I am having problems reading from a file in c++. The development environment that I am using is the Code composer studio (CCS) v3.3, this environment do...
[no replies]
Function pointer problem
 
Hi, I have a class that is defined by this way: #include <PayOff1_Ex21.h> #include <MinMax.h> PayOff::PayOff(double Strike_, double (*f_)(double ,dou...
[13 replies] Last: Hello, The problem came from the declaration of SimpleMonteCarlo2 : i... (by MoonDragon)
alternate to new memory operator
 
Hi , I have a code snippet like COSManager * GenericEventBucket::getNewCOSManager( char *auditGroupId ) { COSManager *COSMgr; COSManagerListItem *ite...
[1 reply] : According to http://unix.derkeiler.com/Newsgroups/comp.unix.solaris/20... (by kbw)
map Iterator
 
Hi I am new to C++/STL. My question is How MAP iterators behave when you are modifying the objects that iterators are iterating. i.e; something like. ...
[1 reply] : Elements in the map are ordered by the key value. If you add an elemen... (by Peter87)
by Rhys64
Someone please help
 
I am in a C++ class in college and i need some help with a project It's a "guess the number game". i got it to work but the teacher said that it needs to be ...
[3 replies] Last: @hulibarri, I would like to see you try to use a switch statement to s... (by Peter87)
File programming in cpp.
 
Hello I am doing a file program in cpp to read all the words in a file put it in a vector<string> object and sort them by alphabetical order : The code : ...
[2 replies] Last: Please put code tags [cod e] [/c ode] around you code next time. It ... (by Peter87)
Fast load first time, much slower second time
 
Hello, I'm experiencing an odd problem while coding my game: The first time a "GameState" is loaded, it's very fast (instantly). When I quit and go back to t...
[2 replies] Last: No memory leaks, no static variables and no globals :/ (by xander333)
March 2012 Pages: 1... 45678... 49
  Archived months: [feb2012] [apr2012]

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