General C++ Programming - November 2021 (Page 5)

sorts
 
could someone help me with this portion // Add 2 sorts of your own. Document which sort you implemented // <add code> Add your first sort algorithm in here vo...
[6 replies] Last: As this is clearly a homework, I’m gonna spout some unwanted (and un... (by Duthomhas)
by tapni
Strings
 
Edit* There are two strings with dynamic size. It's needed to write a function which returns true if these strings have at least one same character and false ...
[5 replies] Last: Eh, if we’re doing homework, I want in. Multibyte strings just take... (by Duthomhas)
by Kmpck
Gcc compiling when a header has macros
 
Hi guys! I am having trouble compiling using gcc with a header in my code has a few macros. Is there a way to do this? Here is my line gcc -lglfw "x:/Docume...
[7 replies] Last: Of course AbstractionAnon, the macro can stand alone in a .h file. My... (by oggin)
Need help with standalone app using VS
 
I need to make a standalone .EXE file from visual studio 2019 that needs to be deployed or installed on a new machine that does not have Visual Studio or any C/...
[13 replies] Last: I added the SDL DLL's in the same project folder as that of my EXE in... (by George PlusPlus)
enums
 
could someone explain how this would display 1 enum Season {Spring, Summer, Fall, Winter} favoriteSeason; favoriteSeason = Summer; cout << favoriteSeason...
[4 replies] Last: thank you all (by ocKiNOsIi)
Pulling data from website
 
I am trying to get stock data from a website. Is there a way to do this with boost?
[4 replies] Last: Maybe it's that resolver code? Dunno, I don't have easy access to Win... (by kbw)
by tapni
Can't compile the program
 
Task: Write a function that finds the longest decreasing sequence in an integer array. And apply this function to three kinds of arrays in main. 1. An array o...
[7 replies] Last: @tapni You don't have a base case for the recursion, it needs this t... (by TheIdeasMan)
Could Someone help. I need to extend my Restauraunt menu to include functions and a do while loop
 
Below are the instructions and below that is my code..... Im having trouble adding functions to my switch statements.. Confused on how to pass the value for add...
[7 replies] Last: Now I can see we, we can look at your query. Im having trouble adding... (by kbw)
how??
 
Problem : The cost of long distance call is based on its destination and time of the day call was made, as well as the duration of the call. The rat...
[2 replies] Last: Thanks for Furry Guy for this: #include <iostream> #include <cctype... (by AbstractionAnon)
what is option --no-undefined
 
what is meaning of option: --no-undefined Do not allow unresolved references in object files if not used ? How is the binary release h...
[1 reply] : Allowing unresolved symbols is a "normal" behavior, where compiled cod... (by mbozzi)
by EmanCS
Reading txt file(different number in each line) and store in a vector
 
I have a text file that contains 40 lines Each line contains different number of integers. For example: 17 18 20 33 41 44 50 55 60 66 Is is possible to...
[3 replies] Last: if you did double vector you could keep the file structure, if you car... (by jonnin)
Smart assert library
 
Good day! :3 There is this beautiful tests library: https://github.com/catchorg/Catch2 It implements some dark magic and can parse REQUIRE statement: TEST_CA...
[10 replies] Last: CoreGuidelines: "Scream when you see a macro that isn’t just used fo... (by jonnin)
Windown type pane
 
Hi, How to get the title of window in language c++ , where type is pane? Thanks
[1 reply] : What operating system (or window manager if *nix)? Edit: I see from t... (by Ganado)
Working of std::map<t1, t2>::erase(iterator position)?
 
I read on cplusplus.com that the operation to delete an element in a std::map by passing the iterator as argument is constant time. If I am not wrong(and ple...
[13 replies] Last: @Harrison56, I think the straight answer to your question is that the... (by lastchance)
Should I use if statements or a hashmap (std::map / std::unsorted_map)?
 
I am making a scripting language in C++ and I want to call functions when I hit keywords, so I want to know before I make big changes, should I use if statement...
[6 replies] Last: One idea I had is to look at how actual open-source projects implement... (by Ganado)
by GLLEES
C++ DLL Dependency
 
I recently started learning coding in c++ after I learned (not too much experience) c. I have the code::blocks IDE and mingw compiler. I have seen that the comp...
[6 replies] Last: until you use some object oriented code :) iostream is 'bloated' bec... (by jonnin)
Why is the random generator not randomly generating a number between 1 and 2
 
I am working on a coin toss program. When I run this code, it returns 2, 100 times. Why is not randomly returning 1's and 2's? (Thank you for helping me? ...
[6 replies] Last: If you only call it one time, how it is going to pick a new number? ... (by AbstractionAnon)
remove goto
 
Does everyone know I can replace goto in this code? int main() { string plainText, left,right, ap="", ke, passKey, rightTerm; string plainTextBl...
[2 replies] Last: @JLBorges Thanks! (by prog2222)
vectors and arrays - connect 3 game (1,2,3)
 
Looking for help on this assignment..New to c++ and looking to see if what I have is "good" code or if should take a different route as well as how to do that ...
[42 replies] Last: Depends what you mean - both are so close to being the same all it req... (by againtry)
Writting in a saved File.
 
Hi, I have a text file with some saved lines. I want to add a new line to the file, after each compilation of my code. I need to keep the previous data. But ...
[3 replies] Last: AT - E nd ... it positions the file pointer to the end, but I did no... (by jonnin)
November 2021 Pages: 1... 3456
  Archived months: [oct2021] [dec2021]

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