General C++ Programming - October 2020 (Page 4)

How to receive input with spaces?
I my main function, the use is asked to input certain information( M#,Mesh#, and object name), however the questions are not displaying correctly on the screen....
Oct 9, 2020 at 9:59am
[2 replies] Last: >> ignores leading white space and stops when a trailing white space i... (by seeplus)
by rnima
How to call a private member function inside main()
I am trying to call a private member function inside main() class Rectangle { private: int size; void computeSize(); }; int main () ...
Oct 9, 2020 at 9:50am
[2 replies] Last: Why is computeSize() private and not public? (by seeplus)
I need some suggestions
I have an assignment that needs to display a calendar year. Do I cout all 12 months and use an int to show year?
Oct 9, 2020 at 9:09am
[2 replies] Last: Start small, display 1 month first. If you get this working you can di... (by Thomas1965)
How to view a .cpp file after preprocessor changes it
Hello. I am having some trouble including iostream etc. when compiling a test 3ds homebrew... And I want to know how I could get a code file that has iostream, ...
Oct 9, 2020 at 1:42am
[12 replies] Last: Isn't there some sort of way to compress headers into one file before ... (by SirEnder125)
Motor on rollerblind
Hey! I am working on a project where I put a stepper motor (28byj-48) on a rollerblind and want to have a physical button but also later might add Google Home t...
Oct 8, 2020 at 7:02pm
[3 replies] Last: modern flash has a LOT of writes before it dies, I would think the mot... (by jonnin)
How do I continue writing to a file without it starting from scratch?
My code has a function that is able to write lines of data to a file like the following example below: Format of the .txt file: Each word is separated by a s...
Oct 8, 2020 at 4:31pm
[4 replies] Last: Looking at the code, some of it (eg search) is more complicated than i... (by seeplus)
Swapping And InsertSorted of a Singly LInked List
Hi, I have completed almost everything but i was't able to implement my swapping and insertionsort function in a singly linked list. All i can think of is to p...
Oct 8, 2020 at 1:26pm
[3 replies] Last: honestly its easier to build the list sorted than to sort it after the... (by jonnin)
Undefined reference error for a while compiling
when the linker is trying to link the function call with its definition, it finds the problem and issues the error as “undefined reference”. #include <iost...
Oct 8, 2020 at 7:14am
[3 replies] Last: @OP It's up to you and your design intention whether the function has ... (by againtry)
time complexity
hey so im trying to find the time complexity(exact) for recursive binary search and having some trouble the left is a code snipet and right is what I think of ...
Oct 7, 2020 at 1:33pm
[2 replies] Last: Things like simple comparisons, arithmetic, returning from a function,... (by Ganado)
Letter swapper code not working. Help!
Hello. I made this code: /* code by Alexander123 */ #include <include.h> // custom header (includes iostream, etc.) void Test(string& word) { for(int i=0;...
Oct 6, 2020 at 5:17pm
[6 replies] Last: Thanks. (by SirEnder125)
The Necklace Problem Program
Directions: Use either DO-WHILE or WHILE loops. Solutions that avoid loops will receive NO POINTS. You must comment to explain the steps of your solutions. A...
Oct 6, 2020 at 4:14pm
[16 replies] Last: That's a pretty thorough piece of work, @dutch! I was trying some prim... (by lastchance)
How to create a linked list class?
Ok, so I want to create a class(MaterialList) that takes in an object from another class(Item), and adds it to a list. Then I want to be able to search through ...
Oct 6, 2020 at 3:02pm
[7 replies] Last: That latter loop could look "simpler" as: for ( const auto& l : mylis... (by keskiverto)
Separating Digits Program
There are 2 parts to Separating Digits; #1. Write a program that takes a non-negative long or int as input and displays each of the digits on a separate line. ...
Oct 6, 2020 at 12:16pm
[12 replies] Last: Great. I wondered if it was going to be rejected as it used recursion.... (by seeplus)
Header file release: credits.hpp
Hello. I made this code and randomly put it here because I'm bored. Here's the code: /* Code by : Alexander123 */ #ifndef CREDITS_H #define CREDITS_H #inc...
Oct 6, 2020 at 2:11am
[2 replies] Last: I'll try to make the code better. (by SirEnder125)
Struggling with the code and very new to programming and C++
Create a flowchart and Pseudocode and create a C++ Program. Prompt the user for salary per year and calculate a Christmas bonus based on number of years worked....
Oct 5, 2020 at 7:22pm
[4 replies] Last: Just focus on one part at a time. Show us what you would do for just ... (by Ganado)
Emergency
Hello, I need help for a project about developing a card game (blackjack). Could someone please help?
Oct 5, 2020 at 5:58pm
[3 replies] Last: Search the forum for "blackjack." The problem comes up often. Some iss... (by dhayden)
Querry
Hi every body I hope you are having a great day, I am new to c++ programming and I while I was practicing c++ questions, I got stucked in the program, after spe...
Oct 5, 2020 at 2:21pm
[3 replies] Last: new ice cream vendor called PopSalon. they are going to sell their ... (by jonnin)
How do I stop this recursion from looping too much?
So this is for an assignment, thus I can only post a small part of my code. I don't need help for the assignment itself, just wanna fix this part of it. The ge...
Oct 5, 2020 at 12:09pm
[2 replies] Last: Lol yup, you're right. I rewrote the function in a much simpler way an... (by souleaterdm1)
File dumper issue?
Hey can someone provide a c++ code example on how to open a file in binary mode and look for any files inside of the binary with a file extension of any and dum...
Oct 5, 2020 at 6:10am
[4 replies] Last: you gonna do it in C? FILE * is C code. regardless, you will do somet... (by jonnin)
Matrix Column Swapping
Hi there, I'm curretnly stuck on a menu program. I'm supposed to create a 5x5 array of char. One of the menu options is to switch the first and the fourth colum...
Oct 5, 2020 at 5:18am
[4 replies] Last: Worked, thank you :)) (by oceanSpray)
October 2020 Pages: 12345
  Archived months: [sep2020] [nov2020]

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