Beginners - July 2013 (Page 36)

by aggsyb
Converting a string with a decimal to a float
 
Hi, I can convert strings to an int easy enough using: string stringVar = "55.33" ; int x = atoi(stringVar.c_str()); but if will only return 55, h...
[1 reply] : Too hasty in posting , played around and got it working with float f... (by aggsyb)
Floats cast to double
 
When you declare something as float why (I'm assuming all compilers do this or maybe this is standard behavior in C++) is it cast to double; for me VS issues a ...
[4 replies] Last: Because you declared the variable f as a float so it should be a float... (by Nubcake95)
by nmn
cout and ofstream
 
My code is something like this. The problem is it only execute csis and not the cout ! if I switch order then only cout and not csis. I am new to c++, so is t...
[2 replies] Last: GOT IT....MUST RESET THE POINTER to the array...other wise the second ... (by nmn)
Running .exe from within
 
I am using visual c++ 2012. I want to run a .exe from resources using some parameters, and I get the following error: Error 1 error LNK1107: invalid or corr...
[no replies]
Could you write this program for me? (1,2)
 
First of all, this is not my homework, but for the company I work for. This is what happened: -I created a Java application which was basically a "application ...
[25 replies] Last: You'll still need it. (by closed account N36fSL3A)
by hychan
How to consider a number
 
How can I consider whether a number is int or double? I used the code but it doesn't output the desired one. Please help me with it. Thanks a lot! :) SAMPLE ...
[9 replies] Last: abhishekm71 's method is risky because if you, for example, have some... (by Zhuge)
Lnk2019 unresolved external symbol error
 
HI I changed my compiler from borland to vs2008 and I am having this error fraction calculator.obj : error LNK2019: unresolved external symbol "void __cdecl s...
[2 replies] Last: oops blunder..got it...THANKS (by nomijigr)
Implementing console program into GUI
 
I want to take a program that I wrote for the console and implement it into a GUI. So far I found a site that does a GUI tutorial, but unfortunately he does a w...
[5 replies] Last: Try google for " visual C++ Youtube Hello world!" About 2,290,000 resu... (by SamuelAdams)
by aggsyb
Using F stream to read first few lines of a text file
 
Hi, I am just learning about using fstream, I have succesfully opened a text file, the next part of what I want to do is first of all only use the first 4 line...
[15 replies] Last: Thanks alot! Although I realised looking through my code I was pulling... (by aggsyb)
by SrKiT
struct tm and strftime issues?
 
Hi, I'm trying to do an e-mail-like program. But I'm having an issue with the date of the "e-mail's". Say, I created an e-mail, if, after that, I create a new o...
[3 replies] Last: Good that you solved it. About the prefixes, I don't use them myself ... (by Peter87)
help with getline
 
i have 2 tasks that i need to do and the first task is done. i have the user enter a number and it opens a txt file. now on the next task i need to have that tx...
[4 replies] Last: i have the first two lines from the text for task one. now i need to t... (by hogwheeley)
RAPSHEET IN C++ .
 
Hi , i am making school project on rapsheet in c++ . program is quite lengthy so u can just execute it . program is running fine . i just need more ideas and su...
[3 replies] Last: thanks for suggestion . but iam using turbo c++ which is quite old . i... (by jayssj11)
#define identifier replacement question
 
Hi y'all, This is my first post, so I wanted to say what's up to everyone! Secondly, if the following question has been answered on the forum, can you direct...
[2 replies] Last: I get it now. Thank you. (by noPstns)
Explicit Specialization of Function Templates Help
 
why would I need it if I could just make a non template function? I'm confused.
[3 replies] Last: > why would I need it if I could just make a non template function? I'... (by JLBorges)
Predefind Function
 
Is there a predefined function that take the first two digits of a number such as 2008 and divide it by a number. I am working on a program that is asking thi...
[6 replies] Last: to take the first two digits of the year, divide and save the remind... (by chipp)
Why use iterators over ints?
 
Why is it preferred to use: for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it) { std::cout << ' ' << *it; } over...
[1 reply] : in your example, i wouldnt prefer to use iterators. http://stackoverf... (by mutexe)
Problem with Switch,do-while
 
Hello all. I'm currently tinkering with C++ and have been playing with a text adventure. My problem is that I'm trying to make a switch statement that if the sw...
[6 replies] Last: You can write own function to check does given string is a correct num... (by sw143)
by me77ow
My first console program = fuel efficiency calculator.
 
So I came up with this simple idea for the program. I ran into a problem. The final output is negative and very far from what it's supposed to be. Here's m...
[6 replies] Last: I have one of them C++ books laying around. I didn't like it, but I'v... (by ThtCooperFellow)
by elfeck
vector<myclass*> and scope
 
Hello, what happens with a pointer stored in a std::vector (e.g. myclass* in std::vector<myclass*>) when the pointer gets destroyed (e.g. local pointer and l...
[8 replies] Last: In this case, Yes. Becouse "*pointer" points to "&object". "Object" wi... (by Nobun)
interchanging lines
 
Write your question here. well.. i dont know if i put the right tittle so anyways im new to c++ prog. and i kind of want to know something here is my code a ...
[8 replies] Last: ok so i got it how it works thnx @whitenite1 i really wasn't expectin... (by xeimaster)
July 2013 Pages: 1... 3435363738... 53
  Archived months: [jun2013] [aug2013]

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