Beginners - May 2022

Question skipping right to answer?
Having an issue with the last question in my code. itll skip right to the answer and say "who is getting into college? its me!" instead of letting me try answer...
[2 replies] Last: Lines 14-25: If you don't recognize the answer, you tell the user to ... (by AbstractionAnon)
Writing to textbox really slow.
Hi, I'm new here. Sorry if this is the wrong forum. ok the below code works but is extremely slow. takes 15 seconds to execute... Why is it going so slow? I ...
[16 replies] Last: It’s just a standard text box. I’m using windows forms. Visual stu... (by Cyclone)
compile time output
I'm trying to add a to-do list to my compile-time output. (gcc from terminal, linux). I found 2 good options, #warning and #pragma message ("text") I tried...
[2 replies] Last: That would work fine too. My problem is that it's a hobby project, s... (by newbieg)
how can "auto&" deduce "int []"
#include<iostream> using namespace std; int main() { int b = { 1,2,3 }; auto& a = b; // int &a = b; cout << typeid(a).name() << endl; // int ...
[3 replies] Last: For info an auto - and in particular with ref to auto& - see: https:/... (by seeplus)
measure execution time - always zero (1,2)
Greetings! I experience some weird behavior when measuring the execution time of two loops. On my laptop, I get certain finite results, but on a cluster node (...
[23 replies] Last: Thanks guys, I appreciate your ideas. I've spoken to my professor now... (by PhysicsIsFun)
Using type declared in template base class
Hi I have the following code: template <typename T> class B { public: using ID = size_t; protected: int x; }; templat...
[1 reply] : Yes. This would suffice: template <typename T> class B { public:... (by JLBorges)
Simultaneously create variable and pass as reference
Is it possible to create a variable and simultaneously pass it as reference to another function? Say I have a function: void HandleEvent(Event& e) { ...
[6 replies] Last: > Is it possible to create a variable and simultaneously pass it as re... (by JLBorges)
Problem with a binary tree code
Hello! I need to compile afunction to search for lineal descendants of a specific element in a binary tree. But I don't understand why case 3 doesn't work. Ple...
[10 replies] Last: an alternative for ,,auto Work out manually what the type should be... (by seeplus)
by Ch1156
SFML Collision Question
So I asked this on the SFML Forums and the only response i got so far was that I could try to use Box2D, which would be nice but im not sure how to set it up ri...
[1 reply] : The actual collision detection happens on line 91. That's where you kn... (by Peter87)
by Geckoo
Xonix mechanics
Hello everyone. I would like to submit to you a problem with which I am struggling hard. I am developing a little project which is a clone of a famous game - Xo...
[4 replies] Last: Here is the uninteresting, platform-specific part of the code. Please... (by mbozzi)
sfml (text pasting issues)
Write your question here. when I paste a text into sfml, ▬ I get that Unicode, is it possible for me to extract from what's in the user's clipboard?
[1 reply] : sf::clipboard (by codinglexernewbie)
by Geckoo
Play a wav data Hello community. I hope that all is good for you. At the link above I read an interesting way in order to crea...
[10 replies] Last: I would definitely encourage newer programmers to write their own .wa... (by mbozzi)
C++ destination and call
Write your question here. Create a program that will accept input for destination of call (1-america, 2-asia, 3-africa, 4-europe), when was call made (0-day ...
[1 reply] : What is the issue you are having trouble with? What is the C++ questio... (by seeplus)
representing a directed graph versus undirected graph
Hi As a learning exercise, I am writing a library for graphs. As I understand it, graphs can be represented as an adjacency list (i.e. for each node, a list ...
[2 replies] Last: Note that a directed graph and an undirected graph are easily represen... (by Duthomhas)
Help with some homework code
Hi guys, so I have this homework with a sensor that measure temp, humidity and pressure. We had been given this UML . We have to imp...
[9 replies] Last: Let the interrogation continue - so far we know it's some sort of a sy... (by againtry)
Get the quotient with decimal using for loop
this has been bugging me for a quite a while now, i'm confused how to get the proper formula to get the correct output here's my code: int quotient() ...
[10 replies] Last: ohhh i just realized that, thank you! i solved my problem thanks ningf... (by whitegentle1)
cntl+H don't find occurrences
Hello! what can be the reason for eclipse environment won't find occurrences of xxxx when I search the entire workspace although xxxx actually exists?
[1 reply] : Are you doing the C/C++ search, or the File search? I believe by defau... (by Ganado)
if statements in stucts/classes?
is it possible to use if statements within a struct?
[8 replies] Last: As George has already said, no in c, yes in C++. I'd say that the pr... (by keskiverto)
postgresql c++ insert statement
I have a mysql insert query in c++. You can see it below. I want to convert mysql db to postgresql. Im using #include <postgresql/libpq-fe.h> for it. pstmt...
[no replies]
May 2022 Pages: 123... 6
  Archived months: [apr2022] [jun2022]

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