General C++ Programming - March 2021 (Page 7)

Number Frequency
 
Allow the user to enter values between 1-9, up to 2 billion values. When the user enters a 0 report the frequency of each digit and terminates the program. Th...
[2 replies] Last: #include <iostream> int main() { int freq { }; std::cout << "En... (by seeplus)
Stuck, Not sure how to get this to run
 
Hey Im getting an error at line 30. Severity Code Description Project File Line Suppression State Error (active) E0135 namespace "std" has no member "getline" ...
[8 replies] Last: Just use one map: #include <iostream> #include <map> #include <stri... (by seeplus)
Sorting Name with Quantity HELP!!
 
I am creating an inventory system that tracks inventory. I need to sort the names of the products alphabetically. And it needs to keep the inventory with it. ...
[3 replies] Last: Good. There are two parts to programming: logic and syntax. What to d... (by keskiverto)
Please help!!
 
/* I am trying to make a program that takes an average of two numbers using multiple functions and out put the results here is what I have so far*/ #include <i...
[8 replies] Last: How to use code tags: http://www.cplusplus.com/articles/jEywvCM9/ HIN... (by George P)
Trying to finalize recursive function for queen problem
 
I am trying to finish code in my void function, however I'm not sure what I am missing in my void function. edit: thanks
[1 reply] : A recursive function needs a recursive call! #include <iostream> us... (by dutch)
How to extract the digit of a binary number in c++?
 
If i require the user to input a binary number, eg. "000010011", how can I extract each digit from the binary number? Also, I want to check whether the input...
[14 replies] Last: tingcymimi, for the future, if you do post on multiple forums, it is g... (by Ganado)
Unitialized memory
 
the following code is to a program that will layout a table that will convert celsius to fahrenheit and kelvin. my issue lies on line 55 where the compiler tell...
[19 replies] Last: = is assignment when you do fahrenheit = (celsius * 1.8) + 32.0; it... (by ne555)
by MA2121
Need Assistance fixing this program
 
Three cars drive a 500 mile route. Write a program that inputs the car make and the number of gallons of fuel used by each car. After called a calcMPG() functio...
[2 replies] Last: Read the assignment carefully. Every sentence dictates something abou... (by dhayden)
by Nitron
Need Help in homework on input/output stream
 
Hi, I got this new homework assignment but am extremely lost since this is a fairly new topic. The assignment is: Write a program that tells what coins to giv...
[1 reply] : First you should design the program. Consider what inputs and outputs ... (by seeplus)
Fixing the program
 
Rewrite the following program correcting any mistakes and adding missing code so that it reads a value from the file "input.txt" and writes it to the file "resu...
[6 replies] Last: Without error messages: #include <fstream> int main() { std::ifst... (by seeplus)
Does c/c++ main source calling a function/library dynamically still need its header
 
Does c/c++ main/caller source calling a function/library dynamically still need its declaration header like that of done statically ?
[4 replies] Last: Could be worse. At least he doesn't seem to be a stealth spammer. Perh... (by dutch)
by frek
Different sorting on a vector
 
#include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <locale> struct Item { bool operator()(const Item& item1, const Item&...
[17 replies] Last: @JLBorges std::partition preserves values; it just swaps elements. Go... (by frek)
March 2021 Pages: 1... 567
  Archived months: [feb2021] [apr2021]

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