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

by Cplusc
explicit type is missing
 
I have a header file and a cpp like this, in the mesh::mesh_build I get the error explicit type is missing,how can I solve it?
[14 replies] Last: Sure. (by Cplusc)
by Cplusc
+= overloading operator
 
Imagine we want to do something like below with defining operator overloading. for (int i=0;i<n_element;i++) { NN = NN + NN_e ; NN = NN...
[15 replies] Last: What do you mean by "do the assembly"? Are you trying to return 6 num... (by dhayden)
Help with copy/swap semantics for class with smart pointer (1,2)
 
Hello. I recently started learning about smart pointers and such, mutexes and what-not. I wanted to make an int array class that holds a dynamically allocated...
[20 replies] Last: Thanks again for the clarification. (by seeplus)
by Cplusc
Pointer and reference
 
Sorry for my naive question. I have been working with c++ for a short time and I never understood well when I should pass a vector or matrix by pointer or by a...
[4 replies] Last: pass by reference unless you can demonstrate a clear need to use a poi... (by jonnin)
by cmisip
How do I create an array of templated class as members of another class
 
How do I iterate over rows and columns array to create Output objects in the class MyClass that I can refer to in pin array index? The pin array of Output obje...
[15 replies] Last: Thanks a lot for all the pointers. I have to admit that at this time ... (by cmisip)
Trouble splitting code into core loop and satellite programs
 
I recently started learning C++ and SDL2 because my ideas stretched beyond my skills. I'm not entirely new to programming, having done some R and python in the ...
[2 replies] Last: I get long lists of errors involving missing or duplicate definitions... (by seeplus)
Boost: Cannot open include files
 
I am working with Boost/bjam, trying to create a Python wrapper over some C++ code. I am getting this error message from my wrapper: wrapper.cpp(1): fatal er...
[15 replies] Last: It is possible that you did not set Additional Include Directories in ... (by Tyler552)
Having a problem with finding the smallest number in an array.
 
Hello i need help regarding this one assignment of mine. I have to cout the smallest element in the array for each of the mark (1-5) but I didn't proceed with m...
[4 replies] Last: Perhaps consider: #include <iostream> #include <iomanip> #include <... (by seeplus)
by hbcpp
Get the address bar url from a browser
 
I would like to know how can I get the url from the address bar in a browser, I would like to do it preferably in the most popular browsers like firefox, chrome...
[9 replies] Last: Found the solution : https://www.cplusplus.com/forum/windows/279044/ (by hbcpp)
by Hyung
Do a function by taking information from file
 
I have a coding to find standard deviation from the file provided. My lecturer suggest to do it in function. I managed to get rid of the error. However i get 0 ...
[7 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <v... (by lastchance)
Definition of ITER_CONCEPT(I)
 
ITER_CONCEPT(I) is defined in https://en.cppreference.com/w/cpp/iterator/random_access_iterator But I have the following doubts? Definition of this con...
[no replies]
by pj33
How to install DCMTK
 
Hello I am new in c++ but i'm trying to install the DCMMTK library but I'm confussed. Can someone give me a clear set of instructions because I was confused wit...
[1 reply] : OS? Compiler? This looks to cover it in great detail for windows / ... (by jonnin)
Capturing only a specific member of a class inside lambda
 
I understand that we have to capture the *this pointer in the lambda to access any of the member variables inside the lambda. Now, why can't I capture only a si...
[3 replies] Last: You can do this (I think it's C++17?) #include <iostream> class Fo... (by seeplus)
by Cplusc
undeclared identifier
 
I have included my class in the main.cpp file but I get this error. error C2065: 'coordinate': undeclared identifier error C2065: 'connectivity': undeclared ide...
[5 replies] Last: I can't comprehend your code and have no idea what it's up to so I'm n... (by dutch)
ordered hashmap recommendation
 
Does anyone know ordered hashmap libraries similar to boost/container/flat_map? I couldnt find proper libraries for ordered hashmaps on the internet. Thanks in ...
[9 replies] Last: What do you find inefficient about boost's flat_map? Inserting items?... (by AbstractionAnon)
Fatal error while building Boost Python binding: cannot open input file 'boost_python.lib'
 
My build keeps encountering a fatal error, and I cannot find out why this is the case. I copied all of the Python libs from boost_1_76_0\lib64-msvc-14.1 into my...
[3 replies] Last: Ah, okay. Thanks. (by wheelspawn)
How to make function from this coding
 
I have coding that needs to find the many values such as highest, smallest, standard deviation, and many more. I was thinking that would the coding be easier to...
[4 replies] Last: for this, one function actually makes more sense to me, because you wo... (by jonnin)
C++ fopen_s not declared in scope
 
I understand fopen_s is not part of C++ std library. How can I replace it qwith std::fstream? Also I need to replace malloc and free with new and delete operato...
[3 replies] Last: Hello leo2008, I just noticed that you have a file "Header.h". You ne... (by Handy Andy)
Could not print out inside the for loop
 
I have coding that needs to print out the file and also find some value from the file. This is my coding : #include <iostream> #include <fstream> using nam...
[3 replies] Last: Thank you so much @seeplus. I have run it and it works. Thank you very... (by kseokjk)
by dune
Creating an Array on the heap
 
I think I get this, but I'm just not sure. Given the following code: int * applyAll(const int *const arr1, size_t size1, const int *const arr2, size_t size2)...
[5 replies] Last: @seeplus: Why not use std::vector? Much easier. The coding exercise,... (by dune)
July 2021 Pages: 12345
  Archived months: [jun2021] [aug2021]

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