Beginners - November 2014 (Page 9)

how to convert string to float?
 
Hi, i have 2 strings: string a="100.10" string b="200.10" how to convert to float so to be summed: 100.10+200.10=300.20 ???? i tried: float aNumer...
[2 replies] Last: Solved: string a="100.10" string b="200.10" aNumero=strtof((a).c_str... (by il dottore)
class
 
OK...I made a thread the other day about the array but what I need is a private class then in main do the code or something like that. Here's the instructions: ...
[13 replies] Last: So why would anyone write all this code to code something that can be... (by AbstractionAnon)
Manipulating with Files
 
Hello, recently, i've done a quizz for my class, where i read the questions and answers from a specific file, i tried to read over the internet to learn how to ...
[3 replies] Last: http://www.mochima.com/tutorials/fileIO.html https://stdcxx.apache.org... (by JLBorges)
Building Lot Are with functions (1,2)
 
I was wondering if this looks about right? I'm starting to get the hang of C++ but I need someone to double check my code. Specifications of the program: • ...
[25 replies] Last: Can you show the full completed code please? (by mockman23)
Pointers and Arrays Question
 
I dont know why the average is not popping up it says 0.00 i still can't find a mistake or what i did wrong. Can i get help? // Chapter 9, Programming C...
[1 reply] : Line 42, 44 : Use count as index instead of numTestScores .... (by tcs)
My code works as is, but how do I use the constructor?
 
Here is my code so far: megatron.h - In namespace megatron::utility template <class T> class megaptr { private: T* object; public: megaptr() ...
[11 replies] Last: > My next thought would be including a static vector to the megaptr cl... (by JLBorges)
Search name(String Manipulation)
 
Desired Output: Enter n: 2 Please input 2 names: Ana Ina Ana Ina Enter name to search: Ana Ana is located at position 1 My output: Enter n: 2 Pleas...
[16 replies] Last: I'm a total newbie so thank you for helping me ^^ (by Vandalism)
by msrt92
Stack in array
 
i want to create s.top public variable .. #include<iostream.h> //#define maxSize 5; struct stack { int stk ; int top; }; stack s; s.t...
[2 replies] Last: sorry I'm not creating function for top... I m creating global variab... (by msrt92)
by EvE12
Back to diamond problem
 
I want to keep the outside stars only and remove the inside diamond shape to be like * * * * * * * * ...
[7 replies] Last: Thank you, Sir. (by EvE12)
Using ofstream with structs
 
Hello all, thank you for taking your time to view this issue. I am currently reading in a .csv file with stats from 2013 and another 2014 stat file. I am attemp...
[no replies]
i have no clue what to do here. please help.
 
Create a CharConverter class that performs various operations on strings. It should have the following two public member functions to start with. The uppe...
[no replies]
can someone explain why (char - 'A' + key) % 26 + 'A' works for the caesar cipher?
 
i had to make a program using a caesar cipher and i did that but the only thing i had to google cause i couldnt figure it out was the formula for shifting the c...
[2 replies] Last: thank you, i understand what the formula does now (by idknuttin)
Having trouble outputting correctly.
 
I have to write a program that takes an input file formatted like this. FR3D,jones,123456-7891,12-123456B joe,jones,1234a6-7891,12-123456B The program ...
[2 replies] Last: As for outputting it to a file, I would suggest creating a string vect... (by closed account 3R5fjE8b)
Help required
 
I keep getting errors while trying to write this program, the code is below. Help on what I am doing wrong would greatly be appreciated. #include <iostream> ...
[4 replies] Last: #include <iostream> using namespace std; int food() {double meat, fru... (by jasonwynn10)
by myName
Get ip and Check in the database (MySQL)
 
Hello everybody, I'm trying to make a system to check that the user ip exists in the database, but is not working #include <windows.h> #include <wininet....
[5 replies] Last: That particular error comes from trying to use + to concatenate to C-s... (by Zhuge)
by clodi
random_shuffle not working?
 
This line of code is giving problems.. random_shuffle( buffer[ 0 ],buffer[ NSITES - 1 ] ); in the function.. void Lattice::initialiseSitesAtomID() { ...
[2 replies] Last: thanks a lot!! it worked! (by clodi)
by njas1
Need Help
 
...
[2 replies] Last: ok here it is i have tried... i dont know what to do next // main.c... (by njas1)
Splitting a character array into strings to a certain character.
 
Is there a way to split a character array filled like this. Hello,how,are,you and split it into strings up to the ,? so you get x = "hello", y = "how"...
[1 reply] : http://stackoverflow.com/a/236803/1959975 (by LB)
fstream / ios::binary mode questions
 
I am unsure about what the purpose of ios::binary is. Can someone please explain this to me. I ask because I need to write a program that keeps students' attend...
[4 replies] Last: All files are 'binary files'. There's nothing different from one file ... (by LB)
by r0bot
very basic: scanf()
 
Dear Forum, it is very basic calculation of adding two numbers. when I enter 1 2 I get the result Numbers you entered is 1, 2, 78 I have no idea where ...
[4 replies] Last: Hi, Also, one should make use of the return value from scanf so one... (by TheIdeasMan)
November 2014 Pages: 1... 7891011... 65
  Archived months: [oct2014] [dec2014]

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