General C++ Programming - September 2019

by SPP
How to convert C++ member function pointer to C function pointer? (1,2)
 
#include <iostream> using namespace std; class Printer { public: void println(const char* string_pointer) { cout << string_pointer << endl; } }; int ...
[24 replies] Last: Interesting. Thanks. (by SPP)
Segmentation Fault
 
The two lines with "error: segmentation fault" comments are causing segmentation fault. Does someone know why? #include <iostream> #include <algorithm> ...
[8 replies] Last: Just practicing data structures. Just wanted to create an array of use... (by rjphares)
looking for some guiding
 
hi there, today I went to StackOverflow and I find some interesting code there "https://stackoverflow.com/questions/30065675/what-does-scanf-nc-mean" #inclu...
[1 reply] : ignoring scanf, c++ is true if not zero, and false for zero. Boolean ... (by jonnin)
Copy 2D array to another 2D array.
 
Hello. Asking for help about copying 2D arrays. For example : I have an array - float a . Users input numbers themselves. How can i copy those numbers to an...
[2 replies] Last: @Repeater , thanks, was using the same thing, but seems that something... (by OwnedPeace)
Help with 2D arrays based on user input
 
The first thing to do is list your requirements. • Calculate and store all windchill values in a two-dimensional (2D) array. • Read from the 2D array in ord...
[2 replies] Last: Well now you need to separate the calculation and printing into separa... (by salem c)
Replacment for sscanf
 
Hi guys. I need function that from data(from Serial port on Arduino) extract "commands" and values. Data should look like this "v=125,rpm=50,dist=1505170,vb...
[6 replies] Last: Code will process around 10 commands per minute. It can do 100 command... (by Pararera)
IMPORTANT
 
, i need to transform a basic taylor series function with integer coefficients ,to an equation called infinite product which has the following formula ...
[7 replies] Last: https://math.stackexchange.com/questions/502160/exponential-function-a... (by lastchance)
by GG00
Polling loop queue
 
Need help with this homework don't know how to start create the polling loop In the main() function, a Sender object (called tx), a Receiver object (called rx)...
[3 replies] Last: tx.readFromSender(int arrayLength, char rv )) That's not how to cal... (by Repeater)
Visualizing my Matching Engine
 
I recently build a matching engine and would like to build a visualisation of it similar to this: https://www.youtube.com/watch?v=MuAFhXLyXdo I have a global...
[1 reply] : > a visualisation of it similar to this I have no idea what that's rep... (by ne555)
just a token question
 
A Boolean\Math expression is a combination of tokens(Operators, ID and others): a = b + 1 but correct me another-thing: an expression can be a token or is bad...
[4 replies] Last: thank you so much for correct me... thank you... i was asking because ... (by Cambalinho)
Provable Functions at CppCon 2019
 
Rob and Jason are joined by Lisa Lippincott in this special episode recorded at CppCon. They first discuss some of the conference highlights and favorite talks ...
[no replies]
GUI Creation for C++ app
 
You don't have to switch IDEs. The QT libraries and headers are just libraries and headers. You can write code in any IDE, or in notepad, that uses Qt libraries...
[2 replies] Last: The now expected cross post from reddit: https://www.reddit.com/r/cpp... (by George P)
Problem capturing webcam (ESCAPI)
 
Hey guys, I'm using ESPCAPI - https://github.com/jarikomppa/escapi to capture my webcam, but when I run the program it seems like either there is an initiali...
[5 replies] Last: Print the working directory of your program by doing system("cd"); . ... (by Ganado)
reverse bit of a vector
 
Hello, If I have a vector of complex<double>s = { { {1,0}}, { {3,0}}, { {6,0}}, { {2,0}}, }; as my input. How can I do a reverse bit of each of th...
[9 replies] Last: I'm still not sure if OP is trying to reverse doubles or if he has som... (by Duthomhas)
Set reference of an abstract class by initialization list
 
I need to call an object of a class that initializes an interface by reference, the problem is that the object is needed during runtime but doesn't exist yet. ...
[2 replies] Last: A reference is a synonym for another object. That means the other obje... (by dhayden)
Repeating contents of a char array if size < than X
 
I am wondering about how one could repeat the content of a char array if the size of the array is less than a spesific size? Here is what I tried: if(s...
[4 replies] Last: Thank you so much @lastchance ! That really did the trick. The "thing... (by An Integer)
Rand() and Quicksort
 
I am trying to sort the following code using quicksort by low to high. With the output in a separate text file. #include <iostream> #include <cstdlib> #inclu...
[5 replies] Last: for this simple example, you would just code quicksort as a function, ... (by jonnin)
by ne555
Array problem
 
¿how big is n? ¿what time complexity would you allow?
[4 replies] Last: These kinds of problems require some mathematical knowledge. You have ... (by Duthomhas)
Need help with programming class task!
 
I just started this university course and there is a programming module which I am terrible at :( Write a new .cpp file, called Tut3_7 that rolls a dice (i.e...
[6 replies] Last: As I replied in your other post on the same topic (please don't create... (by George P)
Need help with simple programming assignment
 
Greetings!!! Normally I would consider myself an ok programmer, but my professor has clearly stomped me. He wants me to write a program that uses no If, If-El...
[5 replies] Last: @Viprous, You just need two operators: / ++ (by lastchance)
September 2019 Pages: 123... 7
  Archived months: [aug2019] [oct2019]

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