Beginners - September 2021 (Page 3)

delay-loaded dll
 
I have a debug .dll build that uses libcurl to send HTTP requests, all working fine. With the release, the program that uses my .dll doesn't like it, the pro...
[5 replies] Last: Thanks all, I'll look into it. (by lostdog)
by T55
Why won't this switch statement work
 
So I've just started making a text based snakes and ladders game in C++ but this switch statement just keeps on returning the default case. #include <...
[2 replies] Last: Holy crap I feel so stupid I was stuck with this for like an hour and ... (by T55)
Debugging A Release
 
Should be a quick one, how do I debug a release? I followed the instructions here https://docs.microsoft.com/en-us/cpp/build/how-to-debug-a-release-build?vi...
[3 replies] Last: you can add instrumentation ... that is, put in a global variable(keep... (by jonnin)
HTTP PUT winsock
 
I have this sending a HTTP PUT, it works great as a one time thing WSAData wsaData; WORD DllVersion = MAKEWORD(2, 1); if (WSAStartup(DllVersion, &wsaData)...
[1 reply] : found it I wasn't closing the socket. closesocket(connection); ... (by lostdog)
Intermittent ifstream::read()
 
I am creating a little project to help distribute a language as a standalone exe. It works by having a "container" exe, which then has the data needed added to ...
[10 replies] Last: In most cases probably not, but since if it doesn't read exactly the n... (by DreamingInsanity)
memcpy
 
Hello, does this function memcpy only copy from src to destination. For instance if the src is an array of 5 ints numbered 1-5, and it was all copied, the src p...
[3 replies] Last: note also that it has the 'pointer issue'. consider struct foo { s... (by jonnin)
by scaar
Shared pointer and copy constructor
 
Hello to everyone. I would like to create a general function that is able to print some info that come from different kinds of objects. There are at least two ...
[7 replies] Last: You could use multiple inheritance. Something like this with my origin... (by dhayden)
Rearranging words in a string?
 
I'm just wondering if it's possible to use getline(cin, string) in some way so if the user were to input "Apple1 Apple2 Apple3", or "John D Doe", it would swap ...
[2 replies] Last: #include <iostream> #include <string> #include <vector> #include <sst... (by lastchance)
by Deng
How to wait in C++?
 
Is there a simple way to code a one-second "pause"? Just like time.sleep(1) in Python: import time print("Ready to Count Down:") a=60 while ( a>0): p...
[9 replies] Last: Try this, it's a slight adaptation from https://stackoverflow.com/ques... (by againtry)
HELP WITH SWITCH STATEMENT c++
 
Can anyone help me with this? I would first like to say I don't just want the answer so please at least provide me with what I should look up in order to sol...
[3 replies] Last: You have an enum which means you can use Burger and Fries as numbers. ... (by zapshe)
HTTP client GET request
 
I'm trying to make a HTTP client, to send commands to a radio software over HTTP via localhost if I type this into my browser, I get the desired result [lower...
[12 replies] Last: @kbw thanks for the help, I had a manic moment with libcURL trying thi... (by lostdog)
by Shizzy
simple calculator crash fix?
 
Hello and sorry in advance if this isn't the correct place for this. I'm very new to C++, I'm in college right now for it and I don't have the best teacher. Wit...
[3 replies] Last: Thanks for the help! The cin.get was exactly what I was missing. Sorry... (by Shizzy)
How exactly would you make a wordcount program?
 
This is proving to be much more difficult than I thought. It has to count words by spaces and sentences by (?,!,.) Everything I do just keeps failing.
[6 replies] Last: As your "words" are meant to be separated by whitespace, why not just ... (by Duthomhas)
program c++ with two function to check if the tree (semtrical +identical)
 
I just created program with two functions to check if the tree is symmetric or the trees are identical, but yet I can not RUN this program and I dont know where...
[4 replies] Last: Don't you know what the result should be? (by seeplus)
exec + fork
 
What will be the result of this code? Explain this line (exec ("/usr/bin/gedit")) int main () { int p; p = fork (); if (p ==0) { printf("child");...
[5 replies] Last: That line executes the program /usr/bin/gedit. What does gedit do? I ... (by dhayden)
Can anyone help create a limit of guesses for my code?
 
I am trying to limit the number of guesses in this random number guessing program to 5. I have everything working except that it doesn't display the "you lost!"...
[3 replies] Last: Oh I see how to fix it now. Thanks for the help! (by coder3124)
Fix for my code
 
Hi, if my input is 3 3 3 * output will be 3***3***3***3 However there should be an exception where if the user inputs n, the letter n would then be represented...
[5 replies] Last: fill is a std::string, sequence of char s, in the example it is crea... (by The Grey Wolf)
by Deng
fstream NOT functioning in Xcode
 
When I wrote the following code on my iMac Xcode, it does not write anything into the file "data.txt"; however, the same code works on Visual Studio 2019 on a w...
[10 replies] Last: Get that, thanks! (by Deng)
by FayZ
Appending to a doubly linked list
 
I'm trying to append an array of characters to a doubly linked list and this is what I have so far. I'm confused about how to get my list to display correctly w...
[3 replies] Last: draw a diagram head is your first element head->next is your second el... (by ne555)
Which text editor to choose
 
Hello everyone, I am new to c ++ and wanted to know which text editor would be the best match. I mainly use "Notepad ++".
[7 replies] Last: > GNU Emacs user here yes, but what editor. moved from vim to neovim... (by ne555)
September 2021 Pages: 12345... 7
  Archived months: [aug2021] [oct2021]

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