Beginners - February 2012 (Page 11)

by Seripa
Compilation issue
 
Hi, I've written a program that works fine in windows vista (From which I compiled it), but I need my friend to be able to use it aswell. He uses windows 7. A...
[4 replies] Last: Since the fstream is what's being affected, i'll post code from the fs... (by Seripa)
by R N
Reading Data from a File
 
Hello guys, I was recently going about an assignment in which I had to read data from a file. Here is what the file contains: ______________________________...
[no replies]
File I/O and While Statement
 
I have an assignment due at 11:59PM. I've had a ton of work to do this week and haven't really got to learn the topic before the assignment. I'm just trying to ...
[16 replies] Last: Well the deadline has passed so now I actually have time to go over th... (by molecularman)
map<string,int> question
 
An assignment that I had was to write a program that reads a text file and outputs each unique word and the number of occurences of each word. I noticed that th...
[4 replies] Last: For the contractions, a very simple solution would be to have a hash o... (by ModShop)
Calculator
 
I've looked through the history and haven't seen this particular problem. here is the code #include <iostream> #include <iomanip> using namespace std; ...
[2 replies] Last: Ah that makes much more sense! Thanks a lot for your help! =) (by Dee Hood)
26x26 Grid (1,2)
 
So, I have no idea where to start with this project. Create and "display" a 26x26 grid with numbering on all sides from 1-26 with each spot containing a letter...
[35 replies] Last: @TruYadoo Sorry about the Visual C++ 2010 Express problems. I only c... (by whitenite1)
by PL285
Help with Friend/Overloaded operator
 
Hello, I need to use a friend function for an overloaded operator. Right now my program takes in user data (height and diameter of a cylinder) and computes the ...
[1 reply] : add CylinderClass tempCylinder; to line 111 (by gelatine)
A question I solved [hopefully]
 
Define a function SwapArray( int [ ], int), that would accept a one dimensional integer array NUMBERS and its size N. The function should rearrange the arra...
[3 replies] Last: Actually my couse includes turbo 3.0 so I have to use it. Thank you th... (by prestige)
by Kaos
Overtime Pay Program
 
Ok guys I just need a little push on why my program is not doing what I want it to do. Bare yourself guys, this may be a lot but all the work is done. Im pos...
[7 replies] Last: Now I need help with this o Provide six test plans to verify the logi... (by Kaos)
Private Variable Question
 
I have a question about private class attributes. I have the following program to calculate the yield-to-maturity for a coupon-paying bond: Bond.h: #ifn...
[7 replies] Last: That's it! Thanks! I forgot to initialize sum to 0 before the loop s... (by skyline01)
by ARAD
HELP NEED EXPLANATION
 
What does fi(b) return when b is positive? long fi(int a){ int c=1; while(a>1){ cāˆ—=a; aāˆ’āˆ’; } return c ; } ...
[6 replies] Last: Yes. @eyepros. In the loop it is not c = a but c *= a (i.e. c = c *a)... (by vin)
Returning value to main
 
Hi, I'm trying to create my first program however, I ran into a deadend. I want to send the value from the switch statement all the way to main. I've tried usin...
[2 replies] Last: Ahh, it compiles now. Thanks! Edit - Egh, the program doesn't work ri... (by PackRat)
Controlling speed of a program
 
I would like to know how I can make a program print a line that is timed so it isn't all at once confusing the user
[4 replies] Last: is there a better way (by Pirogun)
by dkdude
Advancing my calculator
 
Ok, I'm a newbie teaching myself from this website and a book I bought. I created a calculator with basic math operations. However, I would like to advance it...
[7 replies] Last: Wow, thanks for the reply! I really appreciate this new method, I was ... (by dkdude)
file I/0 math and while loops
 
I want to read from a file with the day of the week, high temp and low temp. like this: friday 25.5 11 saturday 36.4 -2 and want to report to the screen the ...
[3 replies] Last: Thanks a lot, that cleared things up a bit. (by closed account 2EURX9L8)
fgets don't work as I expected with this code
 
I have a problem with the codes below.I am trying to do an exercise from a C book.My code first asks for user input,then it seperates the given input into it's ...
[5 replies] Last: Using word=strtok(NULL," \n"); instead of word=strtok(NULL," "); ... (by Awareness)
Monty Hall Conundrum
 
i am trying to write a code to simulate the Monty Hall Probability problem... I'm having issues with the tally in lines 53-63. for some reason its not catching ...
[7 replies] Last: scratch that... it seems to be working fine now.. thanks for your help... (by jonnyprogrammer)
What's The Difference Between These Two Statements?
 
Consider this example: class Simple { public: Simple( int X, int Y ); }; Now, using the above class, what's the difference between t...
[4 replies] Last: In the future? Before C++11 Variant A wasn't possible and it is now th... (by Athar)
Checking for a palindrome in a file.
 
I'm trying to read a file, and test to see if it is "mirrored". My program always displays the file as mirrored. I think most of my problem is in the initial fu...
[4 replies] Last: I know using loops would be easier, but unfortunately I HAVE to write ... (by taythewhiteguy)
int *argcp and char **argv
 
I have made a nice simple function to play a sound. void Play_Sound(const char* filename) { ALuint Buffer, Source; alutInit(/*What goes in here*/...
[2 replies] Last: Works! I did everything you said and now it works great. Thanks (by closed account 2NywAqkS)
February 2012 Pages: 1... 910111213... 64
  Archived months: [jan2012] [mar2012]

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