Beginners - February 2018 (Page 18)

Need help with array type question
 
I am working on a problem which requires me to go through the same array multiple times, first every element, then every 2 elements, then every 3 elements, then...
[1 reply] : #include <iostream> template < typename T > void print_subsequences(... (by JLBorges)
Help with blank outputs in while loops
 
I'm currently trying to create a while loop where the output will count by 2s until it matches the input by the user. Here is the code I have so far. int...
[2 replies] Last: Hi, Please always post all of the code, don't leave out the include s... (by TheIdeasMan)
How do you convert c++ to c# the old fashioned way
 
I have a assignment, (well tones really) but the problem is, I don't understand C# no really, I have no idea how to request input from the user at what given ti...
[5 replies] Last: string buffer = Console.ReadLine(); input1 = Convert.ToDouble(bu... (by Shibitto)
Error checking issues
 
Hi Folks, I am learning C++ and I was doing fairly well until I ran into functions and arrays. I am trying to create a simple program that will allow me to c...
[5 replies] Last: for( const auto& ticket : lotto_tickets ) // for each lottery ticket ... (by JLBorges)
Trying to make a database
 
I am writing and reading from a text file, I'm just messing around trying to get a little bit of the hang of C++, and yes I already know the code looks like gar...
[3 replies] Last: Hello Nichismoke, I refer you to the code in your first post. Line 33... (by Handy Andy)
Knight's Tour Using Warnsdorff's
 
I'm trying to solve the Knight's Tour problem using Warnsdorff's Heuristics, following the example here: https://www.geeksforgeeks.org/warnsdorffs-algorithm-kni...
[no replies]
Fun with Functions
 
My solution to 3rd problem in Fun with Functions, any critic welcome Task Description: ★★★ Make a function called half() that takes an integer argument....
[5 replies] Last: We will never get zero as this is clearly division so any number bein... (by elohssa)
getting errors golfer1 must have class type
 
#include <iostream> #include <string> class FrisbeeGolfer { private: string name; double tosses; double games; double average; double id; publ...
[2 replies] Last: ok, thank you for the help. (by mjones382)
cin fail
 
so when i try to put a letter for number of children for the cin to fail and inform that " number of child must be a number" it shows up for adults as "number o...
[3 replies] Last: Hello poonamp6792, Give this a try: std::cout << "adult tickets s... (by Handy Andy)
ambiguous reference
 
So, I'm making a Hash Table dividing the classes between different archives. Than, the problem is, even if I include the "hash.hpp" file into the main, it looks...
[1 reply] : On line 8 the compiler doesn't know if you want your hash class or std... (by Peter87)
Issue when dividing/modulus?
 
The task is simple, ask the user for two integers, then display the sum, difference, product, quotient, and modulus. My issue is when I test my division and mod...
[4 replies] Last: #include <iostream> #include <cstdlib> // for std::abs(int) using nam... (by JLBorges)
Find specific string and return that string
 
1234567890123 1234567890123 sam WELCOME chris 1234567890123 1234567890123 chris WELCOME sam 1234567890123 1234567890123 luke WELCOME sam so the text could ...
[2 replies] Last: Double post: http://www.cplusplus.com/forum/beginner/230469/ (by Thomas1965)
need to find from either strings and print
 
I have just started to program an I am stuck in one problem. So I have a txt file that contains a single line: i.e. 13digitnumber 13digitnumber letter randomstr...
[3 replies] Last: A very crude way to read the file into different parts. ifstream src... (by Thomas1965)
Dynamic Matrix. Random numbers and size problem.
 
create a dynamic matrix and I can now complete the problem I have is that when you see the results on the screen when creating a 4x4 matrix in the positions ...
[2 replies] Last: Thanks Solved. (by arielga96)
Playing NIM with modified conditions
 
My project was to make the game of NIM with some modified conditions. So far, I've been able to satisfy those, such as adding "sports commentary" and changing t...
[no replies]
Vending Machine
 
how to create vending machine with menu of beverages and menu of coins payment and change
[1 reply] : this topic might help you: http://www.cplusplus.com/forum/general/2304... (by hammerman)
by cosimo
iota is not a member of std
 
Hi, I have these two functions. The first one runs fine. The second one I get two errors: - iota is not a member of 'std' at the line beginning with "std::i...
[5 replies] Last: Thank you kesikeverto, I understand. I did try to plug the c++11 compi... (by cosimo)
Grammar for calculator
 
I have intensely tried to understand the structure behind Bjarne Stroustrup's calculator (Chapter 6 & 7) from Programming Principles and Practice Using C++, but...
[3 replies] Last: Am I wrong to bump this? (by An Integer)
by CJ91
Creating a cube with multiple planes
 
Hello all, I am trying to create a cube that can be viewed in multiple layers along what i assume would be the Z axis - For example 00 00 This would ...
[2 replies] Last: Brilliant we will give these a shot and see how it works, we managed ... (by CJ91)
Reason for printing of 10 at end of line?
 
cout << "Any number: "; char x; while (true) { x = cin.get(); cout << int(x) << " ";
[1 reply] : Hello swezafor, Welcome to the forum. PLEASE ALWAYS USE CODE TAGS (t... (by Handy Andy)
February 2018 Pages: 1... 1617181920... 28
  Archived months: [jan2018] [mar2018]

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