General C++ Programming - January 2011 (Page 16)

Mapping/indexing a vector<string>
 
Hoping someone can point me in the right direction... I have a vector<string> that contains a wordl...
[14 replies] Last: Its a bit late, but still.. I will need to do some reading to under... (by simeonz)
searching through a char array (1,2)
 
I want to make a program that the user enters a phone number like this: 1-800-ABC-DEFG and then spit...
[21 replies] Last: for this program I assumed that the user is inputting correct data. I ... (by shadowvillian)
difference between %lf and %Lf?
 
Is there any difference between %lf and %Lf?
[3 replies] Last: For printf (), the "%lf" is not valid -- it should be "%f". For sca... (by Duthomhas)
Polymorphism (function overloading)
 
Hi, I tried, but i can't change my way of thought of coding, so i deadly need help from you. I...
[5 replies] Last: Thank you all for your precious answers. I can't believe that I'd "... (by hardcode)
by Ozge
OPERATORS???
 
I tried to complete the code it compiles but i am not sure if it is correct.Here it is.. // las...
[3 replies] Last: // lastclass.cpp : Defines the entry point for the console applicatio... (by Kyon)
by Obyz88
ARRAY 2D with char
 
i have: char text ={"one","two","three","four","six","seven","eight","nine"} i need output if i...
[2 replies] Last: use std::map store number as key, string as value (by stereoMatching)
not understanding "push_back" if used recursively
 
#include <iostream> #include <vector> using namespace std; typedef struct Record { std::...
[3 replies] Last: Well, I can't do to much from my iPod (very hard to post), but you are... (by jimc)
What's wrong witht this code?
 
class RadianLongitudeLatitude : public std::pair<double,double> { public: RadianLongitudeLatitud...
[5 replies] Last: RadianLongitudeLatitude is a decendant of std::pair<double,double>::fi... (by teguh123)
What is wrong with this ostringstream code
 
void platformDependent::printAllLocation () { std::ostringstream oss; } I am simply trying t...
[3 replies] Last: well, I dont know where you can find that it requires it, but it does.... (by Seraphimsan)
How to Convert Degrees into Double
 
106°46'21.68 convert it to 106.66 for example. What would be a good code for that? I am newb...
[7 replies] Last: I can't really answer that :O I've never had to write the iostream hea... (by Seraphimsan)
by declan
Try/catch statement not catching bad_alloc
 
Hi, GDB (debugger) tells me that my program is crashing when it tries to allocate memory. The output...
[6 replies] Last: The only code before it in that function is Where did I say in ... (by rapidcoder)
by SebGR
Software prefetching
 
Hey there, In order to get a fast piece of code, I'd like to give a try to software prefetching (...
[2 replies] Last: PanGalactic - Sorry for being at the wrong place, but thanks a bunch f... (by SebGR)
tpe casting - bitwise
 
Hi, which of the typecasting does a bitwise copy ? I believe it is cons_cast. is it correct ?
[2 replies] Last: Hi, Thanks for the answer and the link. (by srinath duraisamy)
by pizet
value checking function
 
Is there a function in standard C++ that would determine wheather a variable has value or not? I mea...
[6 replies] Last: the boost library provides boost::optional. That would be: boost::... (by coder777)
by Adidas
String
 
Hi I need to know when a row is over, how do i do it ? I know that in char the end is presented b...
[4 replies] Last: and if getline(....) fails what it is returned ? it sets bits in the ... (by coder777)
Reading Other Application Data
 
Hi All, I have been assigned a task to read other application data installed in our client's comput...
[no replies]
editing user input
 
Hi all, I am new to c++ and need some help to edit the user input. For example, I ask the user to...
[2 replies] Last: ahh thank you very much! it solved my problem! (by shanex88)
Simpler recursive solution?
 
I have this horrible piece of code void TNode::CreateMoveTree() { CreateNextRowOfMoves(); ...
[8 replies] Last: well m4ster r0shi showed how to solve it (if the level is indeed the i... (by coder777)
want to find the second smallest number without array
 
The question is read 10 integers and find the second smallest number without array.I think with arra...
[1 reply] : int smallest, almost_smallest; If you replace smallest, then you sh... (by ne555)
by vivmen
why static main function not allow ?
 
Hi all, i think in c# or java static main function are there. but when i tried in c++ i got er...
[3 replies] Last: And I should also add that the C++ standard say that it should not be... (by guestgulkan)
January 2011 Pages: 1... 1415161718... 24
  Archived months: [dec2010] [feb2011]

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