General C++ Programming - August 2020

Question about IDE
On Windows, Microsoft Visual Studio is the obvious choice - it's feature-rich, and is straightforward to use.
Aug 30, 2020 at 4:33pm
[9 replies] Last: looks like some forums are vulnerable to edits that would not have bee... (by jonnin)
Implement iterator
I read somewhere that it is possible to implement an `iterator` through defining begin/end methods, so object can be used in the for loop: for(const auto &it...
Aug 28, 2020 at 3:38pm
[10 replies] Last: for (auto i = v.begin(); i != v.end(); ) if (*i == 2) ... (by mbozzi)
by rnima
How to deallocate an array
How can i make sure I delete my array, my destructor is not being called and now i have memory leak. int main() { cout << " Enter the size of the ar...
Aug 28, 2020 at 1:50pm
[11 replies] Last: This is true. I rarely need these, and misspoke as to its usefulness... (by jonnin)
by rnima
How to allocate an array
Completed question, thanks!
Aug 28, 2020 at 6:32am
[no replies]
solved
solved
Aug 28, 2020 at 3:31am
[no replies]
Grading code
When I try to run my code, after 2 tries, the average does not compute. I have to compile again for it to work again even though there was no change to the cod...
Aug 28, 2020 at 1:46am
[1 reply] : You need to do 2 things: 1) In future please use code tags - see <> i... (by againtry)
by ggwm
The data does not send over socket from client to the server
Hello all. I have no c++ skills, so please don't be harsh with me. I have a client and server scripts. On the client I need to accept user's input and send i...
Aug 27, 2020 at 8:52pm
[1 reply] : code tags help <> on the side editor, it makes large code readable. ... (by jonnin)
Login systems for multiple users
Hi everyone. I'm a c++ beginners and trying to make a simple login system for multiple users. New users can register for an account and login into the system. F...
Aug 27, 2020 at 1:28pm
[6 replies] Last: switches have fall through, which is a bug when you do not mean to do ... (by jonnin)
by Ganado
Thank you for solution
Sounds like a reasonable assignment, but what specifically are you having trouble with? We aren't a homework service, but will help you if you get stuck. This ...
Aug 27, 2020 at 6:59am
[2 replies] Last: Here's another starter: #include <iostream> #include <string> void ... (by againtry)
Averaging grades with multiple courses
I am trying to write a c++ code about averaging grades but with multiple courses. I did write it but everytime i run it, it terminates right after i answer what...
Aug 27, 2020 at 5:36am
[7 replies] Last: It's an error to use floating-point numbers in this situation. Floati... (by mbozzi)
program => massive AST??
really quick question. If im in the middle of parsing code, do I eventually just make the entire program into a massive abstract syntax tree??? I think I've con...
Aug 25, 2020 at 4:51am
[3 replies] Last: Can you say clearer (by williamTi)
trouble with Time concersion between US time zones to UTC then converting to military time
I am attempting to take a meeting start and stop time, add an hour to the beginning and the end(autoScaling), convert those times from a user picked time zone (...
Aug 25, 2020 at 1:55am
[1 reply] : while (seasonal == 's') { autoScalingStart = (autoScalingStart + ... (by Ganado)
by Nico
Connect to SQL server
Hello, I am working on a program that parses a webpage to get its input data. The page some contains information from an SQL database. Unfortunately the web...
Aug 24, 2020 at 10:04pm
[no replies]
Confused
Can someone help me understand this answer? Im taking an online course that has quizzes that doesn't require using cin or cout. But am having difficult time und...
Aug 24, 2020 at 6:11pm
[3 replies] Last: Thank you!! Makes a lot of sense now. (by closed account yboiAqkS)
Need help accepting ordered pair of strings
Hi, I am trying to implement a way to accept an ordered pair of strings besides accepting the integer ordered pair of strings. One of the suggestions I received...
Aug 24, 2020 at 12:53pm
[1 reply] : > static const int DEFAULT_VALUE = 0; Make this static const T DEFAULT... (by salem c)
playground as one-dimensional array
I want to find the neighbored cells of a playground, represented by a one-dimensional array. There is no border, the world is donut-formed. Is the mapping fo...
Aug 24, 2020 at 10:38am
[3 replies] Last: Thank you, jonnin. That's a nice trick you provided getting rid of the... (by nuderobmonkey)
Help with programmer defined exception classes
My question is that I am trying to create a user defined exception class that detects when the user enters the same two values for an ordered pair for example: ...
Aug 24, 2020 at 2:45am
[1 reply] : Here's a start - your default (0,0) breaks the rule. (Keep in mind the... (by againtry)
LNK2019 / Undefined reference ERROR.
Hi, I am trying to compile and run an OOP Project but I keep getting 7 LNK2019 Errors everything looks to be defined and linked together. I do not understand wh...
Aug 23, 2020 at 3:23pm
[11 replies] Last: Thank you guys a lot! Finally compiled :D (by Depressed)
by dbabo
invalid use of non-static member function
Hello, i can't figure out the error. Appreciate your advise: error: src/mqqt.cpp: In member function 'int AWS_MQQT::aws_mqqt_setup(...)': src/mqqt.cpp:37:5...
Aug 23, 2020 at 1:03pm
[5 replies] Last: the prototypes don't match, you can't pass it. #include <functional>... (by ne555)
by rnima
How to reverse the elements of an array using two pointers
}
Aug 23, 2020 at 3:38am
[7 replies] Last: Same stuff: void swap(double* p, double* q) { double temp = *p; ... (by againtry)
August 2020 Pages: 123
  Archived months: [jul2020] [sep2020]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.