General C++ Programming - March 2013 (Page 51)

Custom allocator for std::map
 
Is the below code correct? Or does the allocated type mismatch with what an std::map will try to allocate? typedef std::allocator<std::pair<int, std::str...
[13 replies] Last: How do we know that Catfish's allocator is not a special case? We do... (by closed account zb0S216C)
How to prompt user input only letters(a-z)?
 
So I'm making this small program just to practice stuff and I've stumbled upon this problem, how do I have the user enter only letters? while browsing in this ...
[3 replies] Last: same idea. Read the whole line in as a string and verify it is what y... (by Disch)
Error Code Design
 
I have been over-thinking and going in circles for a design aspect of a system, so I figured some forum advice will get me back on track! I have many objects...
[4 replies] Last: I have, but an event system would also be monumental because I would n... (by Tom Yothers)
cout total element in array
 
Hi, i a beginner in C++ programming. I having a problem to show the output of all the element i store at a array called total_price. the output become unreadabl...
[6 replies] Last: Thx for all the reply. I very appreciate this. (by kelvin516)
problem in using gdb
 
while using gdb for a big code having various module i face a lot of problem . how to use it.
[7 replies] Last: On Linux you can use DDD (data display debugger), a frontend for gdb: ... (by closed account D4S8vCM9)
Parse long date/time to HH:MM
 
I'm trying to convert a date & time reply from a modem to HH:MM format. I need to set an Arduino for the correct time on startup. The modem returns: +CCLK: "12...
[1 reply] : You could use a regex expression to extract what you want from the ini... (by ajh32)
How to boost up execution?
 
Hi, I wrote a program to run long simulations, in one cpu core computation. During the run, I checked the cpu occupation was always around 85%. Since my ...
[2 replies] Last: Well, that's really hard to say then without the code. The problem is ... (by KRAkatau)
Issues with vector, inheritance, returning constructor
 
Hi guys, Have a rather convoluted problem and I am not sure how to get about it. First Off I have a "Magic class" with the following function. virtual Eff...
[4 replies] Last: Thanks for the help guys. In the end I just ended up using pointers wh... (by toomanystars)
Help needed.
 
I have to replace a string of a file by first opening it . the code i used is In the file it is CONVERTED_REC_STATS = 7/or any number. i have to replace it wi...
[3 replies] Last: i have no any Idea because i need also.... (by Blanchejem)
Print the name of the student with the Highest GPA along with the GPA
 
Need help printing the name of a user created student with the user created GPA with the Highest GPA after his/her name. #include <iostream> #include <strin...
[no replies]
Calculating the maximum and minimum time needed to run a program
 
In my Programming assignment, I have to use a program provided by my instructor of Fibonnaci numbers and alter it so that instead of showing the amount of time ...
[1 reply] : Suggest you place your code in b/n code tags to make it easier to read... (by buffbill)
by pwd
Obtaining a mean, while sentinel is 0
 
I'm writing a program where a user keeps entering numbers until "0" is entered. Once "0" is entered the loop ends and It displays the mean. Problem is it count...
[3 replies] Last: I think if you just make max and min = price above the loop it should ... (by buffbill)
OpenGL 2.1
 
I am having trouble getting my spheres to rotate in place. It looks like a snowman. My Bottom sphere is rotating in place, but the middle and top one move a...
[no replies]
runge-kutta with 2d kinematics
 
I got to make a runge-kutta program that can solve where an object is at an x position and a y position. Where dx/dt = vx, dy/dt = vy, dvx/dt = 0, and dvy/dt =...
[1 reply] : It was a simple radian-degree error. Here is the code: #include <i... (by crimsonzero2)
Decode / Code a simple cipher
 
So I am trying to make a simple cipher but can't see a pattern between the letters. Convert: A B C D E F G H I J K L M N O P Q R S T U ...
[1 reply] : why is this in general c++ and not the lounge? also, a code doesn't ne... (by closed account Dy7SLyTq)
How do I print out a square of stars with different length and width given?
 
#include <iostream> using namespace std; int main() { int h,v,num; cout<<"Give a value for length "; cin>>v; cout<<"Give a value for width "; cin>>h; for...
[5 replies] Last: got it :D (by incognitocpp)
Does anyone know what I am doing wrong
 
A. Complete the Pointer Program (30 pts) Complete the following program: Include the comments below with your code and use the variable names provided. You...
[1 reply] : Well, you aren't doing anything that the comments say you should be do... (by firedraco)
Affine Encoding Problem
 
I have the encryption code working so I commented out the functions in main. I'm trying to do a decryption using a^-1(x-b) with the code you see but I get all A...
[4 replies] Last: I mis-understood the formula for decoding. So now it's fixed and I ass... (by OregonState1979)
March 2013 Pages: 1... 495051
  Archived months: [feb2013] [apr2013]

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