Beginners - October 2018 (Page 20)

SOS idk how to declare this thing
 
#include <iostream> #include <ctime> #include <cstdlib> #include <valarray> using namespace std;...
[4 replies] Last: For added fun, this is a triple post: http://www.cplusplus.com/forum/... (by MikeyBoy)
Calculations for areas
 
I'm having trouble with the calculations running correctly for the area of a circle and the area of ...
[3 replies] Last: Thank you and yea I can tell a lot could be shortened. Our professor g... (by joeyt2929)
by Seyter
Corrupted Compiler
 
I made this program to determine the biggest value among 5 numbers using thus format. However I have...
[9 replies] Last: Ok I am going to give you the showed-effort award and fixed it for you... (by jonnin)
2 numbers in one function
 
How do you return 2 numbers in one function? Thanks for answering. #include <iostream> using n...
[2 replies] Last: Look at http://www.cplusplus.com/reference/algorithm/swap/ How does it... (by keskiverto)
FileHandling in Class
 
How can you run fstream in Class? Can you tell me what wrong with my code, my code is about file han...
[6 replies] Last: Hello wannabeako, My problem is that how can you run Fstream/file ha... (by Handy Andy)
problem understanding a paragraph in c++ primer
 
A decimal literal has the smallest type of int, long, or long long (i.e., the first type in this ...
[2 replies] Last: you can also force them, eg 123ull is an unsigned long long even thou... (by jonnin)
Coverting this code to c++
 
I need help converting this code into a c++ code. subroutine init ! initialization of MD progra...
[7 replies] Last: Im having enough trouble getting up to date on C++! I probably won't... (by jonnin)
<< requires exactly one argument
 
I keep getting this error with my code. ostream& Set::operator<<(ostream& out, const Set& v){ ...
[2 replies] Last: To explain further: You can define the streaming operator either to b... (by MikeyBoy)
by Satan
Should I use char over string for immutable strings?
 
I'm making an arithmetic parser which would have a static input. So should I use int parser(const *...
[4 replies] Last: int parser(const *char = "5+5+5") {} //this won't compile either, for... (by jonnin)
Cannot fix random number tally program
 
I dont know what else I need to do to make the program work. The code has comments for clarification...
[4 replies] Last: This [...] Is the same as this [...] Although note that if i > 6, t... (by MikeyBoy)
Help with the question
 
In the magical land of Byteland, there are three kinds of citizens: a Bit - 2ms after a Bit appea...
[1 reply] : If this is a Codechef problem, you should know that the Codechef adjud... (by MikeyBoy)
Iteration with randomly generated values
 
This code generates random values for the x, y, and z position of each particle up until the number ...
[5 replies] Last: I'm trying to calculate the potential energy Really? I mean, will y... (by keskiverto)
Need help in optimization!
 
Appy loves balloons! She wants you to give her balloons on each of N consecutive days (numbered 1 th...
[7 replies] Last: Well, the participants now know that the Codechef adjudicators are mon... (by MikeyBoy)
Conversion error
 
Hey, Trying to get a function to return an array of class String but cannot figure it out. The err...
[7 replies] Last: The code actually works because of the other overloaded operators tha... (by keskiverto)
[1st year University Comp Sci] Creating a deck of cards using Structs
 
So I've been a little pressed for time the past couple days and have this somewhat large assignment ...
[2 replies] Last: Your Deck struct should be called Card since a deck is a collection of... (by Thomas1965)
Boolean loop not working correctly
 
I have written the program below and it runs successfully but when the menu choice is input, it just...
[5 replies] Last: char userSelection; const char PROCESS = '2'; if (userSelection == I... (by keskiverto)
Ascii game codding
 
How to code a game using ascii way? Please help me with this, I'm a newbie in codding c++. Thank...
[2 replies] Last: Can I have sample of codes like how to make a 2d map, player, enemies,... (by Ericopawn)
fileio problems with fout
 
Write your question here. #include <iostream> #include <string> #include <iomanip> #include <fst...
[1 reply] : What's the problem? (by kbw)
by Cairus
Getting Trash Output- no undefined variable
 
There is no variable where I am getting the output. it is the 5007465 number. it happens no ma...
[1 reply] : triangleType() returns an int, which you are sending to std::cout on l... (by helios)
Comparison between two strings
 
(This is part of the solution of Exercise 2.6 in Essential C++.) I wrote a funtion to compare two...
[7 replies] Last: @mbozzi @FurryGuy Thanks. I have learned about the string suffix. (by locatee)
October 2018 Pages: 1... 1819202122... 28
  Archived months: [sep2018] [nov2018]

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