General C++ Programming - April 2011 (Page 20)

Simple Math Help
 
For some reason I'm having trouble wrapping my brain around what seems to be a simple math concept. I try to say this in the most general way possible If ...
[4 replies] Last: Ok, the answer here really depends on what Prob(PW) is. If P and W ar... (by m4ster r0shi)
Rent Calculator
 
Hi, I am trying to write a program that displays the total monthly rent due with a 10% late fee assessed. I seem to only get a value of zero as my result. Any s...
[3 replies] Last: try inserting lateFee=lateFeeTotal; totalDue=totalAmount; in line 33... (by tejashs)
Print CD and changes to txt file?
 
Hello all, I'm working on a honeypot with a server/client TCP and I've run into a problem processing the CD command. When I run the program to test my CD functi...
[no replies]
Sucessive approximation C++
 
So here is my problem, my friend and I are writing a simple project for a electrical eng. teacher, who really doesn't know too much about programming c++. We we...
[1 reply] : Do you have VC debuger? Try to find one and then you can check your ap... (by b2ee)
'cin' troubles
 
I'm having troubles with a cin statement in my code and need some guidance. I need my code to refresh an array with completely different ASCII characters, then ...
[10 replies] Last: Yay! The IDE does have nice features, but it is not uncommon for the ... (by Duthomhas)
Are these the same?
 
Are the following two declarations the same? char city = {'D', 'a', 'l', 'l', 'a', 's'}; char city = "Dallas";
[1 reply] : the first one char city = {'D', 'a', 'l', 'l', 'a', 's'}; will jus... (by tejashs)
memory leak
 
Hi, I am trying to write a nice class to process my data but I am making some logical error which causes memory leak, I hope somebody can help. Here is a mini...
[8 replies] Last: The compiler doesn't give a warning because, as you rightly guessed, m... (by Galik)
A Graph Problem
 
Cityplan: http://img705.imageshack.us/img705/2230/aoa.png Economic crisis affected many countries. X Country is one of these countries. The government wants ...
[5 replies] Last: This code is ancient and non-standard (btw, DevCpp is ancient too). ... (by m4ster r0shi)
How To Find A Deleted Value In Array ?
 
Today i had an interview and i was asked a question. Suppose you have an array with 1 to 10000 numbers. If one number is replaced by -1 at an index let say ...
[4 replies] Last: yes i dont think so they were going for that :) (by mansoorazeem)
-NaN problem
 
I'm trying to use a for loop to get the users input of numbers and add them together to get a total, however I'm having some trouble. No matter what i've tried...
[1 reply] : You don't seem to give sub an initial value. So it probably contains g... (by Galik)
Nested Template Structure
 
Firstly, here's my code: #include <iostream> #include <vector> using std::cout; using std::endl; using std::vector; struct Entry { template...
[13 replies] Last: If you only have specific types you want to use, you can use inheritan... (by LB)
C:\Userserror: too few arguments to function ‘void alpha(std::string*, student)’|
 
The following error: C:\Users\main.cpp|25|error: too few arguments to function ‘void alpha(std::string*, student)’| Is linked to this code: ...
[8 replies] Last: LB, Thank you for providing some kind of guidance. Obviously I am new... (by CPlusPlusBeginner)
Some questions
 
Hi all, not sure if I posted in right section of forum but I have some questions for you all. 1. how do I make c++ not wait for enter after cin? 2. is there...
[4 replies] Last: ok ty for the answers so far this would get me going on making my litt... (by undertakerbro)
Graphs in Visual Studio Help plz
 
Hi, im trying get user coordinates and plot a point on an x, y graph, in Visual Stuidio 2010. Cant find the function to do it though. The user will enter the X...
[no replies]
using MultiMap
 
Hi, i am using a MultiMap<int,String>m . Now m has entries like <5,apple>,<5,hello>,<10,world>. if i iterate using a reverse iterator and print out only the se...
[1 reply] : Well, you can use equal_range() to get the range of elements with a ... (by LB)
getch() problem
 
Look at line 29 with shop_pick = getch() For some reason when I input the value 1 is just loops back to the beginning of shop loop rather then continuing o...
[4 replies] Last: @ hamsterman : it was just a thought... it seemed like a good idea at ... (by lnk2019)
General string and char question
 
I know that isdigit is used to check if char has digits. Is there a way to check if a string has a number in a similar way. Also for upper and lower cases?
[7 replies] Last: cout << "Lol yeah"<< endl; (by SFX9901)
Char and Int within switch
 
How do I use both char and int within a switch? #include <iostream> #include <conio.h> #include <cstdlib> #include <string> #include <windows.h> usi...
[11 replies] Last: thanks everyone! Making more sense now :D (by timmah1493)
by imi
function_traits for member functions? (Deducing parameter types from member function pointer)
 
Hi, is it possible to retrieve the parameter types and return value type from a type of a member function pointer? Something like boost::function_traits, ...
[no replies]
Nested For Loop isosceles triangle HELP.
 
Hello, I am just a beginner in programming, i'm just in my first year so i dont know many things in C++.. My professor gave us a project that wil...
[4 replies] Last: we are only allowed to use nested for loop... make basic counter b... (by sasanet)
April 2011 Pages: 1... 1819202122... 37
  Archived months: [mar2011] [may2011]

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