
please wait
by Andy99
Counting loops in switch statement.
|
Hi, I need to count how many times A/B/C/D has been executed in this loop-switch statement. Here is my code: #include <iostream> #include <iomanip> #includ... |
Jul 9, 2022 at 8:08pm
[13 replies] Last: Oh okay I overlooked it. Thanks (by Andy99)
|
by sandbox007
Help with file processing into array
|
Hi, I have some questions regarding reading files and storing in arrays. 1) Am I correct to say that this line of code which is infile.getline(name ,100); ... |
Jul 9, 2022 at 7:11pm
[3 replies] Last: Perhaps something like: #include <iostream> #include <fstream> int... (by seeplus)
|
by rudiHammad
pointer not assigning value to variable
|
Hello, the code bellow is self explanatory #include <iostream> #include <string> class Foo { public: Foo(std::string name) {name_ = name;}; std::st... |
Jul 8, 2022 at 12:14pm
[4 replies] Last: Great, thank you all for the quick response. All clear now. (by rudiHammad)
|
by Rich0327
Build issue with C++, Platformio, for Marlin
|
It's been 4 days now trying to build a firmware file for my new MKS Robin Nano 3.1 board. I've installed the hardware and with the default firmware, it seemed t... |
Jul 7, 2022 at 5:00pm
[4 replies] Last: I'd suggest searching within files to find where values for BOARD_xxxx... (by seeplus)
|
by AlanHudik
Help me
|
I'm trying to make an C++ calculator but only adding numbers works! Here's what i tried: #include <iostream> using namespace std; int main() { i... |
Jul 7, 2022 at 2:48pm
[10 replies] Last: [quote=AlanHudik]the links you sent in the post are also different tha... (by deleted account xyzzy)
|
how to create a text cursor in sfml |
I want to create a text cursor, but i don't know how to properly, I've made a simple one, but it breaks when long characters like √ are in the sf::Text, how d... |
Jul 7, 2022 at 10:10am
[3 replies] Last: sf::Text::findCharacterPos gives you the position of a character. sf... (by Peter87)
|
by hakanxdurak
Bmp file filter pixel adjusting / C language
|
Hello friends, I am currently working on a project which is filtering a bmp file. This smoothing filter uses a 3x3 blurring kernel which is a fixed size small ... |
Jul 7, 2022 at 6:27am
[8 replies] Last: Is it possible that the bitmap does not have a BITMAPINFOHEADER but in... (by coder777)
|
by jNc
how to assign all items in vector std::vector<std::vector<cv::Point> > test to 0?
|
how to assign all items in vector std::vector<std::vector<cv::Point> > test to 0? |
Jul 6, 2022 at 11:29pm
[4 replies] Last: std::vector<std::vector<cv::Point>> test(100, {10, {0, 0}}); You wou... (by mbozzi)
|
by pnwdino
Struggling to fill then print vector of structs
|
Howdy y'all, I am trying to take a .csv file, read it into a vector of struct. and then print out the vector. However I am unable to fill in the vector. When I ... |
Jul 6, 2022 at 4:46pm
[7 replies] Last: I would first read each file line and split into a vector of string. T... (by seeplus)
|
by JamieAl
Element-wise multiplication using Eiegn
|
I am trying to perform an element-wise multiplication of a row vector with matrix. In MATLAB this would be simply done by the "dot" operator or: data_deri... |
Jul 6, 2022 at 4:28pm
[1 reply] : I was able to solve this issue with replacing the last line with: e... (by JamieAl)
|
by DOOMReboot
Common Documentation Requirements/Standards
|
What are the common documentation standards for most companies that primarily use C++? I'd like to publish a library as open source. |
Jul 6, 2022 at 12:27pm
[3 replies] Last: Cubbi, kigar64551, thank you both. I will go with doxygen. (by DOOMReboot)
|
by klebermo
Reading huffman tree from file
|
In the code below, in the decode function, I try rebuild the huffman tree generated in the encode function, and pass this tree to the getCode function and get t... |
Jul 6, 2022 at 11:17am
[4 replies] Last: Is it relevant where within the tree that character appears? Yes, i... (by klebermo)
|
by Geckoo
Prime numbers
|
Hello everyone. I hope that all is fine for you. Today I worked on a little code so as to compute prime numbers - a simple demonstration giving a vision about a... |
Jul 5, 2022 at 4:59pm
[8 replies] Last: Yes - but as I said above, this is an in-efficient algorithm. For deal... (by seeplus)
|
by JamieAl
Error when creating row vector using map in Eigen
|
I am trying to map my std:vector into an Eigen row vector so I can perform element-wise multiplication. I have the error: no matching function for call... |
Jul 5, 2022 at 2:34pm
[2 replies] Last: Thanks! (by JamieAl)
|
by ElusiveTau
How to return the address of a function's static variable?
|
There's no usage context for my question. Just a "what if" scenario I came up with. #include <iostream> using std::cout; struct A { static vo... |
Jul 5, 2022 at 10:13am
[3 replies] Last: Could also pass as int*& - ref to int* - which would avoid having to d... (by seeplus)
|
by copypasta
Basic File Handling - Everything correct?
|
Still learning and doing some basic file handling exercise and was wondering if I wrote this code correct and did I do all the error checking and if statements ... |
Jul 5, 2022 at 4:14am
[7 replies] Last: > My buffer array type is a wchar_t An overload of the file stream c... (by JLBorges)
|
by Geckoo
Boolean "in-line"
|
I don't know how I can call a boolean which has been concatenated in one single line. Usually I talk about "in-line" boolean, but it's not the right expression ... |
Jul 4, 2022 at 10:34pm
[5 replies] Last: Thank you Peter87 and Keskiverto for your clever explanations. The t... (by Geckoo)
|
by lewi0027
C++ while loops with strings
|
Regardless of what value I input the while statement won't recognize the input as matching either of the three predetermined values. I am very new to this... Wh... |
Jul 4, 2022 at 6:27pm
[5 replies] Last: Thanks Seeplus for the link about DeMorgan laws. Interesting short rea... (by Geckoo)
|
by needHelp01
Need to add multiple null values from a binary file to string
|
I want to encrypt a exe(executable file). I am reading the file as binary but when i Store the data in string it skips the null values and the end result after ... |
Jul 4, 2022 at 3:54pm
[5 replies] Last: Reading a binary .exe file into a std::string like this works OK for m... (by seeplus)
|
by StevenB98
segmetation fault
|
I need help. How can i fix that.I am getting a stackoverflow. I want to swap the names of my labels by pressing the swapLabels Button. QString A=ui->LabelRigh... |
Jul 3, 2022 at 11:17pm
[3 replies] Last: How does on_swapLabels_clicked() know what label to swap? If you're... (by kbw)
|