General C++ Programming - February 2021 (Page 4)

Help i am struggling
 
I was asked to write a program that can choose a race and then an entry form with the participants name, boat name, if you want a tshirt and final cost. I have ...
[3 replies] Last: On any forum, there are usually guidelines for posting code. https://w... (by salem c)
Reading/Writing
 
I have a piece of code that has a struct. The purpose of this struct is to store the Huffman codes or "look up table code" used in data compression. The struct ...
[1 reply] : you can't save pointers, generally. You may need to re-write this so ... (by jonnin)
Making 2 programs Communicate
 
Hello, working on a little Neural-net type thing, but I have a small issue, I want my data collecting program, to communicate data with my neural net program. ...
[3 replies] Last: Just an update for any future people with the same issue: Linux/Unix/... (by NickPerry)
How to reuse menu
 
How can I reuse display function to use it for entering the destination? #include <iostream> using namespace std; void fn() { //Contains user...
[1 reply] : It's unclear from what you posted, what function fn() is supposed to d... (by AbstractionAnon)
by jonnin
...
 
how will you know the diff between xml and html? or is this a poorly phrased assignment where you destroy <everything in these >? if its just a <> tag stripper...
[3 replies] Last: and bang - the OP has disappeared in a puff of smoke...... (by seeplus)
text color in c++ codebloks
 
Hi, I am looking for a way to be able to color to the text.... I explain myself better "Hallo world !" written in color blue or white or red etc etc... ...
[4 replies] Last: Windows lets you change the console foreground and background colors. ... (by AbstractionAnon)
Add all even numbers
 
Write a program that allows the user to repeatedly enter integer values. Keep both a count and a sum of all even numbers entered. When the user enters 0 or an...
[7 replies] Last: int number; int sum; int count = 0; while(number > 0){ this is... (by jonnin)
I need help with a program
 
Hi guys can you help me with this program, please Consider the two-dimensional array A [1..n, 1..m] with integer elements. Compose a program that will rearran...
[14 replies] Last: @seeplus: You make them too fancy for the apparent skill level of the ... (by keskiverto)
by jonnin
Visual Studio compiled program runs faster in x86 than x64?
 
yes, things like this can happen. It can go the other way too. Depends on the code. 50% faster is an unusually big difference, though. Did you compile it o...
[7 replies] Last: That's the usual M.O. (by Ganado)
Design a program to play the LoShuSquare Game.
 
Hello, I will leave the instructions for this program. I did it in three different files and just called #include "LoShuSquare.h" as a library, but for some rea...
[1 reply] : "LoShuSquare.h" is not a library. It is a header file shared by two s... (by AbstractionAnon)
Embedded C++ classes
 
Hi, what are the best practices when designing classes in embedded systems? For example I the micro has a I2C, SPI and RS-232 to communicate to various peri...
[1 reply] : I would make an I2C class that can be used by both your sensor and dis... (by AbstractionAnon)
find the exclamation mark in the array
 
Given a two-dimensional array that is not a set of rows. Display lines that do not contain exclamation marks
[11 replies] Last: I vaguely remembered it being the opposite, default was accepting new... (by dutch)
by opfabi
generating a matrix based on 2 numbers from a file
 
hi, im new to programming and i find this problem difficult, I hope you can help me with it. generate a quadratic matrix with the size of the first number, wit...
[3 replies] Last: thank you very much (by opfabi)
by frek
bitset example
 
I get this error for the following code: Error C2398 Element '1': conversion from 'int' to 'unsigned __int64' requires a narrowing conversion 9 #include <i...
[1 reply] : list-initialisation does not allow implicit narrowing conversions. h... (by JLBorges)
input integer from text file and output text file
 
I want to input my integer data from a text file and then my program will run and the final result of this program will generate an output.txt file. You can ...
[9 replies] Last: Thank you code is perfectly running. I solved my ide problem (by shmilon)
by Zenzei
please fix the HEAP CORRUPTION DETECTED error
 
I run a growtopia private server and have been recently getting server crashes due to HEAP CORRUPTION DETECTED error when joining certain worlds. The code ...
[4 replies] Last: It looks like data is the data portion of a packet of some sort. Do yo... (by dhayden)
Recursion return difficulties
 
Test_1
[2 replies] Last: If array is not zero, solve() returns an undefined value to the call... (by helios)
i have a small question
 
//question is in main >>> #include <iostream> using namespace std; class Department { private: int dno; public: Department(int); int getDno(); ...
[3 replies] Last: Just to point out what might be obvious... The following functions ha... (by doug4)
by VoB
Constant iterator and code duplication
 
Implementing a binary search tree, I need to write a iterator and a constant_iterator . My iterator has to be templated on nodeType and pairType , as I...
[7 replies] Last: In that case neither the children nor the parent are const. Only the p... (by coder777)
Advice on creating a regex like tool
 
Hi guys, So Regular expressions are normally written using Deterministic finite automata(DFAs) and Non-Deterministic finite automata, to my understanding I wou...
[7 replies] Last: Thanks, will do :) (by adam2016)
February 2021 Pages: 123456
  Archived months: [jan2021] [mar2021]

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