Beginners - November 2015 (Page 4)

error from ifstream string into class.
Write your question here. I am taking computer science course in uni, and this is my first year, and my prof gave us assignment to simulate soccer program, a...
Nov 29, 2015 at 2:56pm
[3 replies] Last: I am trying to make team data with txt file and trying to ifstream in... (by closed account 48T7M4Gy)
What am i doing wrong here?
I just wanted to try to use the if statement in a program so I though of putting 4 different calculating programs into one and the user would have the choice of...
Nov 29, 2015 at 2:06pm
[17 replies] Last: Well so far far we have been learjijg about cout and cin in school I j... (by Cplusminusplus)
Please help me with dice roll program
Hello, I'm new to c++ and I have this problem. 1) to read all the results of throw from a file called "YahtzeIn.txt" which your program should expected to f...
Nov 29, 2015 at 2:01pm
[8 replies] Last: #include <iostream> #include <fstream> using std::cout; using std::c... (by closed account 48T7M4Gy)
by Cat32
Help with overloaded operators
I am so stuck. Any assistance will result in my undying gratitude. Unfortunately, I don't have much else to offer. Here are the instructions for my assignmen...
Nov 29, 2015 at 12:49pm
[5 replies] Last: One thing you could do is to add a friend function to define the << ... (by Chervil)
output format
how do i decrease the digits of a number or round it down to a specific number of digits? for example.... int n; cin >> n; cout << n << endl; ...
Nov 29, 2015 at 12:41pm
[2 replies] Last: int is entered but what if i want the value to be no more than 7 dig... (by closed account 48T7M4Gy)
Fill vector with different class
Hey guys, i have this problem in my programe: I want to create a vector something like vector <animal> a; where the class animal is abstract. So i don't know ...
Nov 29, 2015 at 12:17pm
[17 replies] Last: If this is a chess board, shouldn't there just be 32 pieces? The ches... (by andywestken)
Need help with algorithim for finding and printing prime numbers in an arra
The issue I'm having is I am having trouble writing the code to find prime numbers in an array. The assignment requires us to open a data file and then our prog...
Nov 29, 2015 at 10:36am
[5 replies] Last: This is another good source and effective pseudocode https://en.wikipe... (by closed account 48T7M4Gy)
Please help.
I cannot write the whole code as it is very long. I will try to just summarise it and explain the problem. My code is a computational code. The main program (...
Nov 29, 2015 at 9:58am
[no replies]
Creating n number of if/switch statements during run time?
For instance, the user enters in a number, for example 5, and it is stored into a int variable n. Now I want to make a menu where it will display 5 options and ...
Nov 29, 2015 at 9:58am
[1 reply] : Make a switch case. And depending on what the user enters, 1-5. call a... (by TarikNeaj)
C++
\Write a c++ program that initially takes an integer value from the user as the loop’s limit. It means that the loop will execute the same times as the input ...
Nov 29, 2015 at 9:22am
[2 replies] Last: Hi shadow64, You have to do your own assignment. People are willing t... (by teez)
plz help me for this code
Write your question here. Write a c++ program that initially takes an integer value from the user as the loop’s limit. It means that the loop will execute th...
Nov 29, 2015 at 7:51am
[6 replies] Last: thanks chicafeo for your kind suggestion i already write the code its ... (by ali1986)
troubleshooting with classes, it compiles with no errors but something in logic must not be ritght
hello, I changed these struct words to classes and not sure what the problem is because it compiles without errors,some guidance on my mistakes is well apprecia...
Nov 29, 2015 at 7:13am
[1 reply] : Hi, What is your specific problem? I had some unused variable warnin... (by TheIdeasMan)
Boolean value not being updated in print loop
Im writing a code for a class and it involves using classes and a boolean value to display a (-) if the fraction is negative. The input function is correct but ...
Nov 29, 2015 at 5:39am
[3 replies] Last: Sorry for the duplicating of posts, but still whenever I enter any nu... (by brawdyll)
Binary conversion
I am trying to figure out how to convert a number to binary. I am running into the problem where it either goes into an infinite loop or it only does one conver...
Nov 29, 2015 at 5:34am
[4 replies] Last: // invariant: result is within ULLONG_MAX unsigned long long to_binar... (by JLBorges)
Using if Else
Can Someone help me pls :( i need this kind of output Seasons of the year Input a number: 2 February is WINTER Happy Valentine’s Day Input a nu...
Nov 29, 2015 at 4:35am
[4 replies] Last: you put a { in front of your if statement and it needs to be after. (by SamuelAdams)
Need help with arrays!!!
I am trying to store values from the user into an array and then display them it seems really simple and I do not know why it is not working. I can store the va...
Nov 29, 2015 at 3:47am
[no replies]
Declaration not allowed here
#include<iomanip.h> #include<dos.h> #include<iostream.h> #include<stdlib.h> #include<stdio.h> #include<process.h> #include<fstream.h> #include<conio.h> ...
Nov 29, 2015 at 3:46am
[no replies]
Learning while loop
This is very helpful, but I was curious is there a way to use this piece of code in such a way e.g. i only want the program to accept 100, 101, and 102 anythin...
Nov 29, 2015 at 3:24am
[6 replies] Last: hi nameishi, I ended up using that style, was curious if there was a... (by teez)
6! "Factorial of six"
Hello guys, I have a slight difficulty finding the most efficient way to represent 6! "factorial of six", here is my feeble attempt to come up with a code, p...
Nov 29, 2015 at 1:24am
[5 replies] Last: @Kemort, -Thank you ! I will! (by Roxanne Sofia)
GUI Builder
I know some basic C++ and have heard that building a GUI is very hard in c++. I know css and was wondering if there is a way to use this and integrate into a, f...
Nov 29, 2015 at 12:07am
[2 replies] Last: Visual Studio is good too as are some others. Obviously VS is a Window... (by closed account 48T7M4Gy)
November 2015 Pages: 123456... 53
  Archived months: [oct2015] [dec2015]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.