Beginners - December 2009 (Page 14)

outfiling using c-string
 
i want to give the user the option to either pring to the screen or print to the file. I was able to succesfully print to the string but when the user choose to...
[no replies]
Whilst I'm not exactly a begginer...
 
I know the basics of object oriented programming, and have been using embedded Lua and Java for quite some time, and I was wondering what exactly I should start...
[2 replies] Last: http://cplusplus.com/doc/tutorial/ (by gcampton)
getlines
 
I posted a problem similar to this a few days ago, but the help I got didn't quite work the way I thought it would, so I'm trying a different approach now... ...
[2 replies] Last: Yeah, I had the file formatted so every line was the same length, and ... (by killemall77777)
cootie programm with functions
 
This are the requirements for my functions. I copy what i finish so far but i have some problems how to set my parameters so the programm runs. Can anybody hel...
[2 replies] Last: Hi, tummychow! I worked on my code and have some changes. It looks at... (by milli2000)
Conversion Specifiers for Ouput Statements.
 
Heres what I dont understand. If I have value=157.8926 and I want to print that value. Why does %g give 157.893 and %f give 157.892600. I thought they woul...
[4 replies] Last: Sorry, by size of the value, I ment the length. And in this case %g i... (by mushroom000)
need timer in math game
 
im putting my function header in here where the players are adding and i need some help on creating a timer so they only have 10 seconds to answer the question:...
[6 replies] Last: thats fine and thanks for the help but my insturctor has removed the n... (by Dizzle919)
How to use probabilities in loops?
 
Hi, suppose i want to run a loop that involves an object(real-life meaning) that chooses two directions: one of the directions returns back to the original po...
[1 reply] : If rand() % 3 is a uniformly distributed random variable, then the pr... (by jsmith)
File segmentation fault
 
Hi, I'm new to the board so I apologise if I haven't searched thoroughly enough, but I think this isn't a common topic. My program is seg faulting when it tr...
[1 reply] : Okay, done-ish... It turns out that the error was related to my input ... (by roushorn)
passing variables
 
I have the following code but I need to pass the result back into the code that it was called from, can anyone help me out? Here's the code: someFunction(){...
[2 replies] Last: lol hah, it was just a syntax error. I was in fact using "=" instead o... (by hopesfall)
1 dem. arrays- issue with calculations
 
Hello- I have to stay in 1d with an array and cannot get calculations to work to save my life. Any assistance with this would be much appreciated. I will in...
[2 replies] Last: Yes- the question is burried in there. But I need to be able to add t... (by mikeit83)
C++ projekt error dedefinition
 
Hello! My code down here doesn't work and my teacher can't help me so I ask you. Errors: - error C2371: 'BetalningsVal' : redefinition; different basic ty...
[2 replies] Last: Hehe thanks but now I get 2 new errors. 'PrisDM' : must return a v... (by fifafille)
by lumbee
Trying to read from a file into an array
 
...hey guys (and gals?). Nube working on the Serendipity project in the Gaddis book. I'm at the point of trying to read data from a file into an array. Heres a ...
[3 replies] Last: ...I think the problem here is that I have strings in my structure, an... (by lumbee)
by mac123
Supermarket Selfbuy machine
 
This program is supposed to enter the total, enter the amount the customer paid, calculate the change and tell how many dollars, quartes, nickels and pennies. T...
[1 reply] : floating point roundoff problem. (by jsmith)
initializing a value in a class?
 
I want to assign a private int to 250 and a public function to be able to call for the value of that private value. How can I do this? Here is what I have, hope...
[4 replies] Last: Notice that the initializer list is better than calling the = operator... (by Bazzy)
"Spaces between words" are possible but how.
 
Hello.I have written this code below on how to enter basic data input for students. Unfortunately, spaces between the words I enter (in testing) cause errors in...
[1 reply] : int age ; cout <<"\nEnter your Age:"; cin>>age ; This is ... (by melkiy)
Maze and matrix
 
Hi I'm a beginner . I have a problem for find a path in maze . I have a matrix for example (6X5) . *** * * **** **** **** **** . I want f...
[3 replies] Last: Ops, it is called "Lee algorithm" in english. http://en.wikipedia.org... (by melkiy)
New to C++
 
I am trying to calculate pay for 10 individuals, and have that data entered into a file. I'm trying to use fptr, can anyone give me some examples of how to do ...
[2 replies] Last: It's the file pointer. I want to create a file that has employees inf... (by mdp1lp26)
Runtime error when i run
 
My code compiles and runs but if fileName != "" I recieve a runtime error. Anyone have any clues as to why? Here is my code: #include <fstream> #include ...
[1 reply] : You have an extra comma after both 'throw' instructions, which makes t... (by lloydchristmas759)
Problem compiling...no idea??
 
No idea whats going on with this one really...any advice? #include <iostream> #include <string> #include <iomanip> using namespace std; float bf(int, ...
[10 replies] Last: or double lcost. (by gcampton)
Post to twitter ??
 
hi i was wondering if it was possible to post to twitter from one script because i know its possible im just now very good with internet type scripts so if any ...
[no replies]
December 2009 Pages: 1... 1213141516... 23
  Archived months: [nov2009] [jan2010]

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