General C++ Programming - June 2020 (Page 2)

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)
Get a rounded value of a non-integer in compile time ?
 
How to compute the rounded value of a non-integer i.e. float/double value in compile time ? In the b...
[1 reply] : As usual, implementing correct algorithms for floating point numbers r... (by mbozzi)
Counting words in a string array c++
 
I am trying to write a code that takes words from a text file, reads them, stores them into a string...
[5 replies] Last: After I posted this, I realized what I was trying to do and what I was... (by schultzgirl)
What is base class inheritance use for?
 
So let's say I have these files: // dog.h file class Dog { public: void function(); } // cat.h...
[9 replies] Last: [code firstline=13]public: // I want to overwrite the Animal::funct... (by MikeyBoy)
SDL subtracting vectors (1,2)
 
Hi guys, so as you can tell by my recent posts I'm messing around with SDL following a couple of ...
[21 replies] Last: one thing that still does kind of confuse me though is, why does magn... (by helios)
by GonlyG
rotating points getting wrong output
 
I'm given various names of stars on 2d plane and X, Y coordinates along with N deg of Counter clockw...
[5 replies] Last: ah, thanks. I thought I had to calculate deg then add rot to it. Didn'... (by GonlyG)
Apology for not C++ topic but its nearby
 
Apology for not C++ topic but instead its nearby 'meta' process Why g++ option -MM -MF afile is not...
[2 replies] Last: Not such, but as it's inside makefile , strongly suspected only if it ... (by marhuum)
When should I use a move contructor?
 
So I now a copy constructor can help us find rvalues in code. So should I use it here? class Exam...
[4 replies] Last: Is the copy constructor used for taking a rvalue? No. Example st... (by mbozzi)
June 2020 Pages: 1234... 6
  Archived months: [may2020] [jul2020]

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