Beginners - September 2010 (Page 26)

by redhat
file
 
Hi every one i'am beginner in c++ and write this code for read from file , in file i have numbers from 1 to 10 , but when program execute , i have 2 addition...
[1 reply] : First, please use [ code ] [ /code ] tags (minus the spaces) when post... (by filipe)
by dznguy
fixed on one side of a line
 
im trying to make it so that when the program calculate, the price is in a fixed value of 2 decimal. yet when i add the line << fixed << after "@ 'price" each"....
[1 reply] : That compiles and works as expected in my compiler. However, in the... (by Thumper)
parsing int to double to int
 
Hi guys. The following line: boxCoor = floor(v_pos /(double(pars::XSIZE))); gives me a warning: warning: converting to ‘int’ from ‘double...
[1 reply] : With an explicit cast: boxCoor = int ( floor(v_pos /(double(pars::X... (by Bazzy)
Error making a save game...
 
In response to my previous topic I tried making a savegame. Sometimes it works, sometimes the variables just become extremely hgh numbers. void save(hero& H...
[1 reply] : Hmmm... My guess is that it works when your hero's name, weapon and sh... (by m4ster r0shi)
How to accept a pointer into a function from main?
 
I am still trying to hammer out some details to speed up my programming. When I need to take a couple of nodes/pointers to nodes, and pass them into a function ...
[1 reply] : void Insert(ptrType *headNode, ptrType *newNode)//parameters wrong ... (by sohguanh)
by Disch
Passing arrays through two functions and getting junk in return.
 
You're obviously doing something wrong. We cannot tell you what you're doing wrong without seeing your code.
[2 replies] Last: Is it just me or is there no first post in this topic? (by LB)
Bad<Ptr> question
 
In a book I am learning from the author does this: unsigned char* storage; storage=0; however whenever I try this I get a Bad<Ptr> CXX0030: Error:...
[3 replies] Last: I don't know if 0 translates to NULL or not. In C++, 0 and NULL a... (by firedraco)
by wtf
Mutually Exclusive Events Style Question
 
What is your all preferences regarding the following: if (condition1) return true; else return false; or: if (condition1) return true...
[8 replies] Last: Agreed with Galik. Make your variable names clear and detailed as po... (by Thumper)
by wtf
Will someone please tell me why this dosn't work?
 
I'm getting tired of not being able to write robust code that catches for these simple errors. All i want to do is clear the cin.buffer. Is that too hard to a...
[2 replies] Last: cin.ignore()'s first parameter is the number of characters to ignore. ... (by firedraco)
Trying to make a savegame.
 
So I made an RPG last couple of days and looking for a way to make it save... I know I should use input/output file but I just don't understand the tutorial he...
[8 replies] Last: Good point. (by Galik)
Using Arrays
 
I am in my first C++ class and we are using the book C++ For business programers. We have just started capter 6 which covers arrays and I am lost The book wants...
[3 replies] Last: You don't have any arrays actually working in your program... You need... (by ingenioushax)
Reading Data From .csv File
 
I've just started C++ after doing basic java last year and we are expected to know stuff that I have obviously forgotten so I need some help please! I have t...
[no replies]
About Irrlicht
 
I don't know if this is the right section but I am a C++ beginner but this is my problem. Some of you might have heard of the Irrlicht game engine. Its a f...
[3 replies] Last: Update. Downloaded and installed Codeblocks. Opened and compiled i... (by JimNewbie)
getch() not working properly
 
I wrote a little piece of code to test the getch() function: int menu() { cout<<"What would you like to do?\n"; cout<<"\n1: Battle a monster!\n";...
[10 replies] Last: I didn't mean to be ironic or anything like it, I was just curious bec... (by filipe)
Harmonic Mean Calculation result: "inf" unless I use small values
 
Hello, I'm in my first programming class at college for my computer science major, yeah! It's a lot of fun learning C++, especially the problem I have right ...
[2 replies] Last: Thanks! I don't know how I missed that I had "1" instead of "1.0" That... (by lmcgregor)
show list
 
My program should allow the user to enter up to 100 Zip Codes and keep a count of how many times each one is entered. If a zip code has already been entered it ...
[5 replies] Last: That's where google can become your best friend :P Search about findi... (by Thumper)
by Timbo1
invalid conversion from `int'
 
Hi there for some reason i am getting this error when I try to compile my code: 55 C:\Documents and Settings\Timbo\My Documents\C++\Map and Load Updater\GU...
[4 replies] Last: Thanks, could not find this anywhere on google (by Timbo1)
Exercises
 
Hello ladies, and gentlemen of cplusplus forums. I'm a new guy here, this is the first programming forum I've decided to take the time to join, and participate ...
[2 replies] Last: Nothing specific made me want to start programming. The idea of making... (by Thumper)
Functions returning values tutorial
 
Hello, I am fairly new to C++ programming but not new to programming, I have programmed in VB and Pascal in the past. I am using C++ from the ground up b...
[6 replies] Last: I started out with C++ for Dummies 5th Edition by Stephen Randy Davis.... (by Thumper)
by dlugo
Tips on functions, char *argv[], ifstreams and arrays...
 
I'm having a little trouble with my code. I've created the following function: int main (int argc, char *argv ). I use this along with an ifstream to pull cha...
[1 reply] : I don't think I'm quite understanding your situation, but having it al... (by Thumper)
September 2010 Pages: 1... 2425262728... 32
  Archived months: [aug2010] [oct2010]

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