General C++ Programming - November 2020 (Page 6)

FPN math bug
 
From https://cboard.cprogramming.com/c-programming/179473-i-cant-spot-my-mistake.html Welp the new more thorough tests revealed a bug as I was expecting in FPN...
[1 reply] : Never mind, fixed the code like this: int_t alup__mul( alup_t _NUM, ... (by awsdert)
Program to verify if odd numbers are equal with even numbers
 
A natural number x of maximum 9 digits is read from the keyboard. It is required to check whether the number of even digits is equal to the number of odd digi...
[2 replies] Last: #include <iostream> int main() { size_t num {}, cnt {}; std::co... (by seeplus)
What output/approach is required for all testcases correct
 
CREDIT SUISSE PROBLEM :: Whenever a company trades securities, there are various risks involved with the trade. Risk analysis is done for each trade in order t...
[1 reply] : your code gives 1.75 instead of 1.5 for the first testcase (by ne555)
program to display numbers from an interval
 
How can i create a program to display numbers from given interval cin>>a , cin>>b, with for loop?
[2 replies] Last: thanks (by grooviqw)
Creating an array for my MADLIBS program
 
Instructions: "The first line in the file contains how many questions or prompts there are for the particular mad libs game. You need to read this number from t...
[1 reply] : The user should have each line displayed one at a time so they can en... (by seeplus)
2d Array average not working?
 
I can't figure out why I am getting ambiguous numbers on average and lowest numbers. I have no errors but output is in correct any push in right direction appr...
[6 replies] Last: Thank you will try to remember that!!! (by briancb2004)
Problems with a program, switch statement
 
Hi i made a program with switch, if i input a character to show me if is vowel or a consonant if is letter and to show me if is odd or even if it's number i do...
[6 replies] Last: thank you (by grooviqw)
Can someone help me with FPN division please?
 
I'll start by referencing the original thread I posted this problem in https://cboard.cprogramming.com/c-programming/179473-i-cant-spot-my-mistake.html Basi...
[8 replies] Last: About to start work so can't respond to any msgs but I mamged to fix t... (by awsdert)
How to take info from a text file and put it into a function and take the output and put it into a new file
 
#include <iostream> #include <fstream> #include <string> using namespace std; float rowAverage(float val1, float val2, float val3, float val4, floa...
[3 replies] Last: Your read loop has an issue as eof() doesn't work the way you're think... (by seeplus)
by alexas
OpenMP break out of the task
 
This place was so helpful so many times with c++, so I dare to ask a question about openmp just in case someone has and is willing to share . I apologize in adv...
[1 reply] : https://community.intel.com/t5/Intel-oneAPI-Threading-Building/is-ther... (by againtry)
Returning a bitmap from a video using JNI
 
I am using the following code to return a bitmap from a video using jni then to display it using c++ and Openframeworks.You may not be familiar with Openframew...
[no replies]
Getting a Seg Fault
 
Hey guys, I seem to be getting a seg fault from a short rudimentary C program, the program just contains a char buffer (500 bytes) the string passed in from ar...
[2 replies] Last: ahh good point, I didn't even think of that as a possibility, seems t... (by adam2016)
Implementing 4 Way linked list including 4rows and 3 columns?
 
Can you guys please help me with 4 Way linked list including 4rows and 3 columns?
[1 reply] : Sure. Why not? (by doug4)
Matrix problem windows, c++, codeblocks, gnu gcc compiler
 
I haven't used C ++ for a while, today I started making a program with the matrix, but I have a problem: when I assign values to each row, the last row changes ...
[5 replies] Last: If you want to get really fancy you can overload std::ostream's opera... (by deleted account xyzzy)
Who can help me with this program please :* (1,2)
 
Compose a program that will determine all numbers of the form 2abac divisible by n, where n is a given nonzero natural number.Make this program with while and d...
[20 replies] Last: every loop can be every other loop. a while for loop looks like: for(... (by jonnin)
File is like argument
 
I have the code and I need to file has been like argument of function: inputfile_to_vector(); inputfile_to_deque(); inputfile_to_list(); ...
[3 replies] Last: keskiverto // pass name T function( const std::string& filename ) { ... (by onetwo123)
Boost Serialization of base/derived class via BOOST_CLASS_EXPORT_KEY/BOOST_CLASS_IMPLEMENTATION
 
Dear all I use boost::serialization, and am troubled with the below, well known, error occurs. > unregistered class - derived class not registered or exporte...
[2 replies] Last: I apologize for my question that lacks in detail of code. But, I could... (by Mitsuru)
Problems with sfml
 
Hi All, I am a new programmer learning how to program in C++. Right now I have a simple program. #include <SFML/graphics.hpp> #include <iostream> int ma...
[5 replies] Last: https://www.sfml-dev.org/tutorials/2.5/start-vc.php (by againtry)
by Hanske
Serialize a derived class with constant members
 
Hello, I have an issue with trying to serialize const members of a derived class. I tried the solution form this link: https://stackoverflow.com/questions/50603...
[8 replies] Last: int const a = 0; const_cast<int&>(a) = 24; // wrong It is undefined... (by mbozzi)
Usb serial interface
 
Hi , i have some usb sticks gives me some reading and how i want to read the data from a usb stick .can someone help me how to do that ? i am using ubuntu 18....
[2 replies] Last: you just treat them as you would any filesystem. There is nothing spe... (by jonnin)
November 2020 Pages: 1... 4567
  Archived months: [oct2020] [dec2020]

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