
please wait
by frek
Passing pointers to function taking iterators
|
Suppose for some reason this code is meant: void accum(std::vector<double>::iterator bg, std::vector<double>::iterator end) { std::cout << std::accumulate(bg,... |
May 31, 2023 at 10:18pm
[12 replies] Last: [quote=frek]Why don't you, Peter, as a great coder, go for C++20/23. T... (by Peter87)
|
by Gyiove
event class and dynamic bind paramaters
|
I have this c++ class here which can register class function into event class and then call them all with 1 function later. Code: template < typename...... |
May 30, 2023 at 3:23pm
[3 replies] Last: You're making this more complicated than necessary, IMHO. You don't n... (by dhayden)
|
by frek
C++ multithreading deadlock example
|
std::mutex m1, m2; void f_1() { std::unique_lock l1{m1}, l2{m2}; } void f_2() { std::unique_lock l1{m1}, l2{m2}; } Suppose f_1 starts first and l1 lock... |
May 30, 2023 at 9:39am
[9 replies] Last: got it, thanks. (by frek)
|
by Bengbers
How should I export the API of a shared library?
|
I use Eclipse CDT on a Fedora machine for developing C++ code. In the first project I programmed in C++, I wrote a client for Basex (Open Source XML database). ... |
May 25, 2023 at 2:39pm
[7 replies] Last: I've been trying for nearly a week to create submodules for libBasexCp... (by Bengbers)
|
by dodge55
Shortcut Icon same as application icon
|
I have a compiled Win32 app that uses a .ico resource file, declared in the .cpp file. My icon displays fine in the application when running. How can I automa... |
May 25, 2023 at 1:26am
[2 replies] Last: I think you can direct the shortcut to the icon, or the file where it ... (by jonnin)
|
by kigar64551
Exit condition for 'std::unordered_map' iterator loop with a step size > 1
|
Suppose I have an std::unordered_map containing a large number of elements. I need to process each element and I want to speed up the overall process by usi... |
May 21, 2023 at 5:48pm
[7 replies] Last: C++23: for( auto&& [k,v] : g_input | std::views::as_const | std::view... (by JLBorges)
|
Implement fast hash function |
Hi everyone, I have a project where I need to apply a hash function to some variables in a sequential way. That action will be done frequently so I need it... |
May 19, 2023 at 12:22pm
[4 replies] Last: Thanks for your help! These algorithms seem to be what I need. (by Alejandro Antonio)
|
by darkdave
freeglut dll and lib
|
Hello all, I have a c++ project in Visual Studio 6. I have a GL folder where I keep the glut32.lib and dll. I recently added freeglut.dll, .h _extx.h _ucal.h bu... |
May 17, 2023 at 4:51pm
[7 replies] Last: I installed VS 2012 That version is not as ancient as VS6, but it is... (by deleted account xyzzy)
|
by newbieg
Linkers and Libraries
|
I've been building a framework for about a year now that builds an OOP for SDL (recently updated for SDL3). Now I would like to set it up so my user only has to... |
May 17, 2023 at 3:55am
[4 replies] Last: Pkg-config was really easy to set up, it just requires writing a singl... (by newbieg)
|
by JUANDENT
how to specify gcm.cache in g++ command line option?
|
g++ needs to have access to the compiled modules that are required by a module. Thus,. if we compile the first module that has no inter-module dependecies like ... |
May 15, 2023 at 10:38am
[2 replies] Last: the gcm.cache contains compiled information from the module that is re... (by JUANDENT)
|
by kitfox
Should I cache to disk the memory used by my undo stack?
|
I've written a program what uses an undo stack to keep track of edits the user makes. At the moment it is using a lot of memory because some of the states it h... |
May 15, 2023 at 8:25am
[3 replies] Last: I think you shouldn't care too munch, unless we really talk about mas... (by kigar64551)
|
by JUANDENT
compiling modules C++ 20 with g++ 12.2.0
|
I am using the following commands: g++ -std=c++20 -fmodules-ts -c -x c++ cxx_type_traits_polyfill.ixx g++ -std=c++20 -fmodules-ts -c -x c++ type_traits.... |
May 15, 2023 at 5:30am
[1 reply] : Take a look at this: sqlite_orm::internal ::polyfill Is that the na... (by coder777)
|
by rozick1
comparing actual to expected values in neural network
|
hello i am implementing a neural network using the Eigen library (for matrix multiplication). in order to calculate the loss, and to start computing the error... |
May 14, 2023 at 10:13pm
[no replies]
|
by Geckoo
MIPS
|
Hello. I am working on a tiny interpreter for MIPS language. It works well as expected. I have implemented some classical OPs with a clever parser. I think that... |
May 14, 2023 at 8:33pm
[no replies]
|
by Cambalinho
why C\C++ don't have a standard Graphics, Sound or others libraries?
|
why C\C++ don't have a standard Graphics, sound or others libraries? on Turbo C\C++ we have the Graphics library |
May 14, 2023 at 5:28pm
[5 replies] Last: thanks for all to all (by Cambalinho)
|
by Blueshark1
Fixing wrong radius values on table output?
|
Hello, For a project I am supposed to have my code output a table as temperature and radius change going from the core of a star to its surface. So far t... |
May 11, 2023 at 9:31am
[14 replies] Last: Try this one. It's based on the linear (for density) stellar model in... (by lastchance)
|
by frek
CTAD
|
Hi all, template <typename T> struct Length { T sz; }; void foo(Length len) { std::cout << len.sz; } int main() { foo(Length{5}); } I get the error: ... |
May 10, 2023 at 11:23am
[6 replies] Last: Note that a class template is not a class, it's something you use to g... (by Peter87)
|
by neerajsati
Try to write Bubble Sort Program
|
Hi, I am confused about some code I found online(https://www.techgeekbuzz.com/blog/recursive-bubble-sort-in-c/). It works, but there is a function I need to ... |
May 7, 2023 at 7:48pm
[5 replies] Last: If you actually do look at the link the code the spammer vomited up is... (by deleted account xyzzy)
|
by JUANDENT
How to specify a concept that requires a const method?
|
Hi, I have this: class Circle : public GeoObj { public: virtual void draw() const override; }; So I have created a concept like this: ... |
May 3, 2023 at 8:00pm
[2 replies] Last: yes you are correct about every type being convertible to void! Thank... (by JUANDENT)
|
by malibor
How should center alignment of child components work?
|
I'm working on a class called "LayoutManager" which provides interface to layout child windows or controls within parent window. There are several enumerations... |
May 3, 2023 at 5:31pm
[6 replies] Last: Option 1 and 4 are "left first then right" That is from the center, p... (by malibor)
|