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

difference between std::list and linked lists
 
Hello i am new in C++ and i was thinking of what is the difference between std::list and linked list and why we learn linked lists if std::list is available.
[9 replies] Last: as far as alternates go, there is also the skip-list, which has extra ... (by jonnin)
string Library
 
When I use the library #include<cstring> in my C++ program I do not have any problems with 'string' declarations. I am only using the 'using namespace st...
[8 replies] Last: @OP A C-style string is a const linear array of characters, hence cons... (by againtry)
#define
 
I thought typedef was used for macros these days? Is #define used for this also? sorry if this just seems like a dumb question - I'm reading a book that uses #...
[7 replies] Last: a few macros are critical for debugging. there are predefined tools l... (by jonnin)
Sorting alphabetically
 
I am not sure how to sort output in alphabetical order. It took me awhile to get the code to work how it should, reading from an input.txt and then outputting t...
[3 replies] Last: Stick it between where you generate the list and where you print it. (... (by Duthomhas)
Image fading help needed C++ (1,2,3)
 
Hi All I am new to image processing using c++. I need to read an image pixel by pixel, then modify the image by fading it, and then the final result must be ...
[48 replies] Last: I took 10 min crack at the first one. this works. the tga file I w... (by jonnin)
Implementing graph in a rectangular grid.
 
EDIT - the OP has disappeared and taken his question with him. Your question is nonsense, and the people on StackOverflow thought the same: https://stackoverfl...
[3 replies] Last: Eh, I think it was just incompetence, not spam, but whatever. Another ... (by Ganado)
forward and reverse for loops with C++ containers
 
(I'm including SSCCE [ http://www.sscce.org/ ]code snippets so those not familiar with the subject can follow along, the regulars here will implicitly understan...
[1 reply] : FYI, Visual Studio 2019, build 16.11.2 requires the C++ language stand... (by George P)
fstream inFile filter (super basic codes)
 
Hi, this is my first time posting here so if I violated any rules I am truly sorry. I am a new CS student and I've been learning programming in C++ for almost ...
[12 replies] Last: Hi! Sorry for the late reply! I've been working on the code myself and... (by Hush3212)
ofstream() '<<' ambiguous error (1,2)
 
Cannot satisfy the Compiler with this simple code. It works just fine in another Xcode C++ project, same Build Settings, I can cout << ss ; OK, but canno...
[25 replies] Last: Yes, that's what it is. I can't help feeling that C++ was being a ... (by mbozzi)
Visual Studio 2019: How do I see code work in real time
 
Wasn't sure where to post this. It could fall under Windows Programming or Lounge but since I've been getting all my help for this project in this forum I deci...
[11 replies] Last: Thanks for your help, Guys. I'm good to go. (by bishoposiris)
by ameera
C++ using Atom, output w/ terminal, macbook air M1
 
hi all, i'm trying to run C++ on Atom (using macbook air M1). the output is in the terminal shell and it works perfectly fine but, when it's compeleted, i ge...
[1 reply] : See this Reddit thread https://www.reddit.com/r/osx/comments/397uep/ch... (by mbozzi)
count the number of distinct duplicated characters in a string
 
Hello guys, Do you have any idea how to count the number of distinct duplicated characters that appear in a string? For instance in the string "George" I hav...
[6 replies] Last: #include <iostream> #include <string> int main() { const int no_... (by againtry)
return to original position commands
 
Hello guys, I have a problem kinda disturbing. Suppose I am at O(0,0) and I can go one step forward with f, turn 90 degrees right with r and 90degrees left wit...
[3 replies] Last: @Duthomhas gave you a formula for the number of moves, not commands. S... (by mbozzi)
C++ Swap help me?
 
int mainFinder(int 0, int 5){ if (l == r){ for(int i = 0; i < 6; i++){ res = 0; op = ' '; } int res = finder(0, 0, 0...
[1 reply] : PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting co... (by AbstractionAnon)
Why is there "Type undefined reference to `People::humans'"?
 
I am working on eclipse workspace and I have this code. I ran it into another program and it works perfectly, but eclipse doesn't like the line. Why is that, an...
[2 replies] Last: Also note that void setHumans(Human humans ); is going to clash wi... (by lastchance)
by gadi01
a help please
 
I have a problem of minimizing a function to optimize 8 variables, but for each data point the routine must generate two solutions , one for x and one for x a...
[6 replies] Last: [quote=gadi01]I have a problem of minimizing a function to optimize 8 ... (by lastchance)
What is "Unknown array size in delete?"
 
I built my People.cpp code and got the error "Unknown array size in delete" for line 6 and line 10. I never even used the delete function, and I don't think the...
[11 replies] Last: Nevermind, I fixed it now. I will get back to you when I run into anot... (by anonymoususer13579)
Why does 'Human' not name a type?
 
It was working perfectly fine until I added the People class and the People.cpp in my eclipse file. The error is in the three lines with the Human types in Peop...
[2 replies] Last: It's fixed now. Thanks! (by anonymoususer13579)
by volang
Access Violation
 
This line: string domainName = argv ; cause "Access Violation" in debug. But no problems when running without debug. Can someone pls explain what's going o...
[10 replies] Last: Haha, nice catch. Thanks man :) (by volang)
by szupek
Struggling with getting passed pointer to a double array type string. What am I doing wrong?
 
Hello. I am trying to get past "basic" functions in C++ and onto objects and passing pointers to manipulate array data. I am passing a csv file into my progr...
[15 replies] Last: @jlb That's a good point :+) I guess I am always reading the docs fro... (by TheIdeasMan)
September 2021 Pages: 1... 3456
  Archived months: [aug2021] [oct2021]

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