General C++ Programming (Page 3)

Random Number from an Array
 
Hello there! I wanna know if there is any posibility to get a random number from Array? I want to ...
[7 replies] Last: Alas, even the seed_seq might be problematic That's what I meant by ... (by dutch)
should I use decltype(auto) or auto for return type?
 
Hi, I have this code.. I don't know if operator() should return decltype(auto) or auto. What is ...
[2 replies] Last: thanks!! (by JUANDENT)
file->SendRequest retreiving ANSI encoding
 
Hello All, I hope you are fine.. Please, I am doing a C++ request: file->SendRequest (class CHttpF...
[no replies]
non-constexpr lambda marked constexpr should not compile
 
According to C++ 17, the following code should not compile: auto squared2 = (auto val) cons...
[2 replies] Last: Makes sense... I agree VStudio hasn't implemented this error reporting... (by JUANDENT)
Should I put #include"" or #include<> first?
 
Is there a different to doing: #inlcude "file.h" #include <iostream> rather than: ...
[1 reply] : Depends entirely on what is inside file.h. But generally speaking, no... (by Ganado)
In what order are translation units linked?
 
I have a VStudio 2019 project with many .cpp files. I copied some code and did some chnages and now ...
[8 replies] Last: thanks! (by JUANDENT)
[SDL] randomly changing movement
 
Hi guys, right now with the following code, the movements of the rectangle are quite compound, the ...
[5 replies] Last: Whenever the 'virtual' wall appears the rectangle is rejected. I would... (by coder777)
by GonlyG
maze pathfinder looping forever
 
I borrowed a recursive maze path finder algorithm with the same logic as a working program, but can'...
[8 replies] Last: Because there, someone feels like he's helping ??? lol Where some peop... (by oneidacharisse)
Can someone recognise this error message and mention the potential reason plz...
 
/usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/Users/FACULTY/A...
[11 replies] Last: > "C:\cygwin64\bin\g++.exe" -Wall -Wextra -Wpedantic -std=c++11 -o "He... (by salem c)
by volang
Separate code into multiple files
 
Good day. I have a question about separating code and using header files. My goal is... 1. Hav...
[17 replies] Last: What @jlb said. Also, namespaces inherently span multiple files. The... (by doug4)
Copy Elision for temporaries not working
 
According to C++ 17, the following code should compile: class MyClass { public: MyClass(...
[3 replies] Last: You should also be getting some warnings about your main() function. ... (by jlb)
by mary00
how to format data (1,2)
 
Hi guys, I'm not very expert but I should create a program in C that reads the data contained in an...
[30 replies] Last: can someone help me please??? I don't know how to solve with foef prob... (by mary00)
cpp.chat: It Doesn’t Get Bored and It Doesn’t Get Tired
 
This week we chat with a Yuri Minaev, of PVS Studio, about static analysis - and why you shouldn't b...
[no replies]
by volang
Fastest way to communicate with another local process?
 
I have mysql running on my computer. How do I send querys from another application/process on same c...
[4 replies] Last: kbw Thanks for finding the link. That solved the problem (by volang)
copy a memset grid
 
Hello, how do I fill in a test grid and copy it into the final grid? To test a maximum of grid and k...
[14 replies] Last: yes, that is a ranged based for loop. (by jonnin)
by L67GS
C++ newbie
 
Hi, I'm very new to C++. I've written a pretty neat chatbot and have her doing some system commands....
[8 replies] Last: Be aware that I'm talking about the exec system call, not the exec com... (by dhayden)
Testing if vectors are pointing in same direction
 
hey guys, so you guessed it I'm still studying vectors and game physics, My goal now is to test if ...
[5 replies] Last: The above answers are correct in the general case, where a vector is r... (by helios)
by volang
How does the filesystem search for files
 
How does the filesystem work? E.g. If I want to open "bob.txt" in a directory with 2 million o...
[3 replies] Last: Great links. Thanks alot :) (by volang)
Accept, read and store txt file into strin array. then count
 
So I posted earlier and realized later I was wayyyy off. Now, I think I'm pretty close to doing what...
[7 replies] Last: I'm trying to open txt file, read the words into a string array, then... (by kbw)
Singly linked list from Binary File
 
I have created code that can generates random numbers between 0 and 99, then converts them to Binary...
[2 replies] Last: Must you create the list yourself? Can you use std::list instead?... (by dhayden)
Pages: 12345... 8
  Archived months: [may2020]

Cannot post in this page. To post a new message, go to the first page.