General C++ Programming - June 2017 (Page 7)

C++ fstream question
 
I've been a bit confused lately on how to use fstream. I understand the infile and outfile basics, but for example if I were to have a txt file that had questio...
[1 reply] : Hints: #include <iostream> #include <fstream> #include <limits> #incl... (by Enoizat)
Make a playlist with the music info input by the user
 
DJ Playlist Manager:
[4 replies] Last: Hints: Song.h: #ifndef MY_SONG_CLASS #define MY_SONG_CLASS #includ... (by Enoizat)
Help solving this tax Problem Please
 
Create the following 4- function C++ program: A family can claim $1000 tax credit per child, but the total child tax credit cannot exceed $4000. Recently the t...
[2 replies] Last: Thank you, it worked (by RickAngel)
Wt's wt_config.xml
 
Anyone familiar enough with that file to be able to help me out? I need to write it up for a Wt application I want to write for a CS course final project. Th...
[no replies]
C++ class, homework help (1,2)
 
#include <iostream> #include <iomanip> #include <cstdlib> using namespace std; int beginGame(int); void displayBoard(int); bool testWinner(int, int, i...
[26 replies] Last: main() shouldn't be called recursively. Meaning inside main, there sho... (by wildblue)
by zesan
How To Override A Member Function Under Class In C++ ?
 
I am working with a book database, in my code below the "changeEntry()" function is not working, in that function I want to override the old entry in the databa...
[5 replies] Last: Thanks a lot for helping. (by zesan)
by zesan
How to pass image file as pointer and reference as std::vector<char> ?
 
#include <string> #include <sstream> #include <fstream> #include <vector> #include <cstring> #include <cstdlib> #include <stdio.h> #include <ostream> ...
[8 replies] Last: Thank you for your nice feedback. (by zesan)
Help on a for loop for triplicating bacteria!
 
I have to create a program that simulates cell reproduction of a bacteria. The user is to input a number of days greater than 0 and up to 2 weeks, and an initia...
[1 reply] : cout << "Days" << setw(10) << "Cells" << endl; //Table headings fo... (by arbwok)
by Pete8
question about how to declare something
 
I'm encountering a problem involving ?something? named __asm__. It's not an int, and it's not a typical char string (can't declare it as such anyhow). The bu...
[4 replies] Last: if this isn't working, we used to have to call the "emit" assembler fu... (by jonnin)
(pcnf) discrete mathematics's project in c++
 
Hi everyone anyone can help me about how to write this project .the project is about tow statements that program could distinction that these tow statement are ...
[1 reply] : you want to compare 2 symbolic equations, is this correct? (by jonnin)
by Kalcor
Expressing this functions in terms of big-o-notation
 
Express the function n 3 /1000 - 100n 2 - 100n+3 in terms of Θ-notation. Trying to understand how to calculate such a function, It was in CLRS book as an exe...
[1 reply] : big-o is a bit weird to come up with the FORMAL answer. Here, if N is... (by jonnin)
while(file.good()&&!file.eof()) run once more
 
Hi, When I run the following code, the while loop will run more once time. The file contents are: A_LABEL,A_NAME B_LABEL,B_NAME C_LABEL,C_NAME(END OF FILE) ...
[5 replies] Last: As cubbi explained, you read 3 records. No problem. The file is co... (by AbstractionAnon)
invalid operands of types 'float' and 'float' to binary 'operator%'
 
I am trying to fidn the largest prime factor of a very large number so i used float but i am getting this error. #include<iostream> using namespace std; ...
[1 reply] : fmod function. Use that for floating types. your number will fit in... (by jonnin)
by RezaAb
How to create a progress bar in C++
 
Hello guys, I have finished a code including a for loop with thousands of times calculations and I want to create a progress bar for the counter. I tried sev...
[4 replies] Last: That was basically a cut/paste from some code I have. Here is a worki... (by dhayden)
the console doesn't show full result
 
When i tried to run it, ran successfully but i couldn't see the full result result on the console screen. it shows results from p=8000. #include<iostream...
[4 replies] Last: A workaround, not an ideal situation, is to rewrite your program to ou... (by closed account E0p9LyTq)
by Kalcor
Concluding this condition
 
Now it's time of Olympiads. Vanya and Egor decided to make his own team to take part in a programming Olympiad. They've been best friends ever since primary sc...
[2 replies] Last: Love you @lastchance xP (by Kalcor)
by Kalcor
Can't seem to solve this
 
You've got array a , a , ..., a , consisting of n integers. Count the number of ways to split all the elements of the array into three contiguous parts s...
[16 replies] Last: Ah.. I get it now.. thanks alot! (by Kalcor)
Calculating overtime pay using a void function
 
I was given a program that used double functions to calculate overtime pay. Hours 1 to 37 gets paid their standard rate. Hours 38 to 50 gets paid time and a hal...
[3 replies] Last: EDITED POST: @jj245037 figured it out, already. :-) Since you must use... (by chicofeo)
Creating a temperature converter using two void functions
 
/*Hi, everyone. I am having trouble making a converter that allows the user to input a number that then translates that number into either Celsius or Fahrenheit...
[5 replies] Last: Thanks a lot for replying so quickly, wildblue. I just discovered this... (by jj245037)
syntax help!
 
Hello Guys!, I need help undestanding the next line from the code below. Rectangle( int a = 0, int b = 0):Shape(a, b) { } How can i rewrite it so make it clea...
[3 replies] Last: Rectangle is derived from Shape. So any time you construct a Rectangle... (by dhayden)
June 2017 Pages: 1... 56789... 11
  Archived months: [may2017] [jul2017]

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