General C++ Programming - June 2013 (Page 23)

How to convert string to double without changing actual data
 
Hi,I have to convert string to double. i'm using "atof" function to achieve same. I have string as "0.0409434228722337" and i'm converting with "atof" But...
[5 replies] Last: No, it means you cannot always get an exact result. Andy (by andywestken)
General questions for C++
 
I have three statements that I believe are true. Though I am not 100% certain that I am correct. Could someone provide some feedback and/or thoughts? Thanks in ...
[4 replies] Last: by replicator you probably mean copy constructor, and each class has a... (by TinyTeeTree)
name mangling
 
hello, is there any way to mangle a function defination ???can any one tell how to mangle c++ functions using c++ compiler.... i know how to demangle the c...
[1 reply] : Read this: https://en.wikipedia.org/wiki/Name_mangling The name mang... (by coder777)
Why I Cant get an output?
 
I wrote a program that should check if phrase is in file and output the result. File: ////////////// Eat my shorts! Ay Carumba! Stupid Flanders... ///////...
[2 replies] Last: Thank You :D (by slaidas)
HELP: C++ program for calculating overtime payment of an employee.
 
Please refer to this image: http://i42.tinypic.com/5ed0yc.png Hope you don't mind not posting the content here. I'm a beginner and know little up to array...
[11 replies] Last: Reversiblean, No problem at all. Like I said I'm making the transitio... (by closed account 2U7GNwbp)
Returning a datatype other than the declared function header datatype
 
I have designed a class called matrixType that has some overloaded operators (+, -, *, and <<); the arithmetic operator functions of which are overloaded as m...
[1 reply] : Is it possible for a function to return a dataType (like a string) ot... (by AbstractionAnon)
Help with SDL? No entry point?
 
Ill probably go find help in the SDL forums but anyways it says there is no entry point? I'm new with SDL so it will probably be something REALLY simple... /...
[no replies]
by lbi11
c++ print calendar
 
i'm completely new at this and would appreciate all the help i can get. there's no year needed, justa simple output of the following months in a grid like form...
[5 replies] Last: That isn't the sample output either. (by Debjit Ghosh)
Calculating using lexical analyzer/tokenizer
 
How can I calculate something in postfix notation like 5 + 4 by typing in calc "5 4 *" for some program. I have a Lexer that parses the string. For the Lexer, t...
[no replies]
program help
 
I have a program due for class and am completely lost on how to even start. Assignment: You are working for a company that administers multiple choice tests ...
[2 replies] Last: Well this assignment is made up of different section and are broken do... (by Tertius Kgatla)
Does anyone know what wrong with this code, appearantly there is an error but it will output the right answer anyway.
 
#include <iostream > using namespace std; float* calculatePercentage(float mark , float total) { float percentage = mark/total *100; return &percentage; ...
[3 replies] Last: #include <iostream > using namespace std; float calculatePercentag... (by ShodanHo)
Assign a non-Number to a Double Variable?
 
I am writing a math program, using variables of type double, and had initialized all variables to 0.0. I now realize that not all results will be valid. I...
[3 replies] Last: The above is standard C++. http://www.cplusplus.com/reference/limits/... (by ats15)
Converting Time string to float
 
I have a vector<string> of times that I want to convert to vector<double>. The time string is in the form 00:00.000. Is there a STL or something like it algorit...
[3 replies] Last: Use the std::transform from algorithms: #include <iostream> #includ... (by ShodanHo)
Removing punctuations off from a string
 
I'm working on a problem in which I've to design a program in which the punctuations should be removed from the string. For eg., if input str is: "Hello!!"; the...
[1 reply] : #include <iostream> #include <string> int main() { std::string t... (by MiiNiPaa)
by dem7w2
passing a polymorphic vectors
 
Okay this time I have an ACTUAL polymorphic problem. void func(std::vector< BaseClass* > A){} std::vector< SubClass* > B; func(B); //Compile error C26...
[12 replies] Last: > If the types are implicitly convertible, you can use the constructor... (by JLBorges)
Need Help with map.
 
I have a txt file with 150 000 words and insert them to a map, thats not problem, but every time when i insert them take a 3,4 second to do this.I know takes ti...
[7 replies] Last: I try with range insert and its work. Start in 2 seconds.Thank you. (by trysomethingbetter)
Typecasting
 
I am reading this book that has all its examples in c. So far I've been able to write it all using c++ but I was wondering if anyone could tell me what does thi...
[7 replies] Last: const char* would. But what if in next Windows version it will be cha... (by helios)
Need Help: Function in class
 
Hey, I'm just started to learn that thing that calls Object-Oriented Programming. And to test myself desided to code simple "user"-object creator. So I has code...
[5 replies] Last: this helps too: http://www.cplusplus.com/doc/tutorial/ (by dem7w2)
question about a program
 
i want to create a program (in c++ or c#) that will play mp3 files but also display a word file with the lyrics of the mp3 song playing. so if i choose a mp3 fi...
[5 replies] Last: Here is a simple example for the ID. This is written in c++ though. ... (by Stormhawk)
by Scipio
Applying Runge-Kutta method to circular motion
 
Hey People! I'm trying to approximate circular motion applying the Runge-Kutta method. I use the following functions as my derivatives for the velocities vel...
[1 reply] : Hey people, For anyone interested: I figured it out. Problem is that ... (by Scipio)
June 2013 Pages: 1... 2122232425... 28
  Archived months: [may2013] [jul2013]

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