Beginners - March 2020 (Page 13)

Using Enums with Structual Bindings
 
Hi all, I wanted to ask if it is possible to use Enums with Structural bindings? I am working through a practice exercise which builds on a previous example I...
[2 replies] Last: Hi Jonnin, I hope you're not getting sick of hearing me say Thank Yo... (by ExponentialP)
Organizing Simulation Results
 
I wrote a queue program based on a checkout simulation taking data from a text file (sim.txt). I got everything to work in my code except for one thing. I want ...
[1 reply] : bool readNextSim(fstream &f, double parameters ) { for (int i = 0; i... (by ne555)
Read the CSV file and assign it to an array arr [100]
 
New member... Hi everybody. I think this is a problem many friends like me will face. Thanks to everyone for listing ways to handle it. The CSV file has 6 dat...
[5 replies] Last: We always have to skip line 1. Is this inconvenience necessary? incon... (by coder777)
Array Printing a Hex
 
I posted this on StackOverflow and got a response that basically said I am not worthy. I really want to learn, so I'm hoping someone will give me some good feed...
[4 replies] Last: Thank you so very much!!! (by LotToLearn)
by obeeey
How to save a long number?
 
Hi :) I've got a task to save numbers of any size and then do some stuff with them. The thing is, the MAX amount of those numbers to be loaded is 100 000, so...
[11 replies] Last: @jonnin, thank you so much for your response. It's not so easy for me ... (by jonnin)
decrypted password
 
Hi! I need some recommendation and tips about how can i make these code better, I mean if I want to do it without needing to use const zero. string decryptPa...
[16 replies] Last: I see that you haven't use the vowels string in the following code: ... (by dhayden)
braille to english, english to braille
 
Hello. Im trying to write a code that converts braille into English on c++. I have a file that will read in a given statement, and then output it into english i...
[9 replies] Last: Hello jimmyjohn2, I beg to differ with lastchance this has not been... (by Handy Andy)
by YodaD
cout one random number
 
How can I get this to just cot one of those rand values. We need to get one number from a random interval 1,20. And compare it to the input by the user. But the...
[6 replies] Last: @Manga, I wrote the C++ code specially as a direct change over from th... (by George P)
by CP Fan
Creating file in C drive
 
I am having trouble creating a file on the C drive. I wrote the code below to troubleshoot the problem. It is based on the code from the tutorial section on inp...
[3 replies] Last: Thank you, gentlemen for clearing this up. I have marked this as solve... (by CP Fan)
Getting "Unresolved External Symbol" Error when trying to run the program
 
Please see the following three codes, Header File #pragma once #include <iostream> struct task { int id; int dur; int s_time; int e_time; i...
[1 reply] : It doesn't really make sense for the exact code you've posted, but nor... (by dutch)
how to get the average for odd and even of their sum
 
how to get the average i don't know what is wrong with my code. i get my even and odds but i need to get the average of both odd and even in separate ways of th...
[17 replies] Last: #include<iostream> #include<cstring> using namespace std; int main(... (by Manga)
Brand new to c++ and need help with a school task
 
Hello, I have to ask a user to enter integers or to enter q to quit. I have written a program that finally allows the user to enter q without the program enteri...
[6 replies] Last: The problem with cross-posting is that it makes two+ people do redunda... (by Ganado)
by LHJay
How to replace 0's with blank space in Linked List
 
I have a file with pairs of very large numbers that I'm reading as a string, then converting them into integers and adding them into a linked list. Then, when i...
[6 replies] Last: @dhayden, I plan to reverse the lists. @Handy Andy, the 32 to ' ' meth... (by LHJay)
C++ Binary Search Tree - Deleting a Node / Return Type
 
I am working with Binary Search Trees and have been checking out a variety of implementations online, as well as in some books. When deleting from a binary sear...
[7 replies] Last: sorry (by LittleKnowledge)
Stack Program
 
I'm currently writing a program where it guesses whether or not the given series of operations and corresponding return values from an input file are operating ...
[10 replies] Last: I figured out the problem with my code. It was the way I was using the... (by Orion98)
Reading white spaces from a text file along with letters as string values
 
I'm trying to read from a text file such as "the apple does not fall far from the tree" where each letter has a random assigned string value such as a=01000, b=...
[3 replies] Last: Use istream::get(): char ch; while (cin.get(ch)) { cout << table... (by dhayden)
by momof4
undefined reference to vtable and typeinfo
 
Does anyone know what these errors mean? I have a class called Bird, and I tried to initialize it with a pointer. I'm not sure what a vtable is, and I don't kno...
[2 replies] Last: undefined reference to 'vtable for Bird' This probably means that yo... (by MikeyBoy)
Generate certain number of questions
 
The objective is to generate however number of questions the user wants. The questions and answers both need to be between 0 and 100. I've run this program seve...
[4 replies] Last: Hello nadia102, You are very welcome. Now that you should be done I ... (by Handy Andy)
Using Searches and sorts for strings
 
I've got this code to sort and search random strings. But the time isn't calculating correctly.. Unsure of the issue. #include <iostream> #include <iomanip>...
[3 replies] Last: @dutch, I've figured it out, the issue(besides the time-=clock)... (by CodeNovice01)
How can I fix this with a nested loop?
 
I wrote a program that asks a user to input letters to be converted into telephone digits for a phone number. I got it to work with a switch case in a loop but ...
[2 replies] Last: Use a separate function. #include <iostream> #include <string> using... (by lastchance)
March 2020 Pages: 1... 11121314
  Archived months: [feb2020] [apr2020]

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