Beginners - January 2021 (Page 8)

by skcpp
High Address Preference in Stack
 
Is it true that structures are stored in stack starting from the highest hexadecimal address and in ...
[2 replies] Last: Thanks dutch. Neat response! It makes sense that the "heap" grows upwa... (by skcpp)
by kmce
shared pointers
 
I have a question about shared pointers, I found code on a site that is talking about shared pointer...
[9 replies] Last: That's a good question. Remember that it's a question of ownership, wh... (by dutch)
Binary Searching
 
Hello there! I just have a question. How can I solve this problem. It keeps getting error and I don'...
[2 replies] Last: Hello NoobCoder2333, In regards to the question that you deleted. You... (by Handy Andy)
by siid14
Segmentation Fault: 11
 
I get a segmentation fault, I do not understand why. Checked my code seems fine... Trying to get the...
[3 replies] Last: it means nothing on stack to trace, but why would that happen? It is ... (by coder777)
by skcpp
Changing the starting address of an array (1,2)
 
Is there a use case at all for needing to change the starting address of an array at run time? The l...
[20 replies] Last: It's fun trying to work it out though. cpp.sh seems to be allocating ... (by lastchance)
Review of Code C++
 
I feel that much of the code is to par for a homework assignment. Yes, I'm being upfront about this ...
[7 replies] Last: > why is "using namespace std" considered bad practice? It is conside... (by JLBorges)
Get string and save in array of pointers in C++
 
Hello, I would like to get 10 string from the input and save in array of pointers. Like this: ...
[7 replies] Last: If there must be an array of pointers, we can do this: #include <ios... (by JLBorges)
by skcpp
Memory Mgmt in C++ (Basic Question)
 
Similar to malloc and calloc in good old C, does the developer need to manually manage memory alloca...
[7 replies] Last: the c++ containers can be used in place of new and delete if you want ... (by jonnin)
Implementing queue using an array
 
Hello guys. I am trying to implement a queue by using an array. However my code has some flaws so pl...
[6 replies] Last: Thank you all very much for your precious posts! (by gevCplus)
by skcpp
Data type on stack
 
When a object or a pointer is declared with a data type, is the data type also stored on stack, and ...
[10 replies] Last: Duh! Thanks it works now :-) (by skcpp)
Passing function pointer down through multiple functions
 
This may have been a little bit of a complicated project to start with especially since I knew nothi...
[7 replies] Last: You have Callback CallBack and _callback . No wonder you can't ke... (by dhayden)
Rhombus star pattern
 
What i can change in this code so it would print 8 rows without asking? #include <stdio.h> ...
[6 replies] Last: As C without multiple for loops, consider: #define _CRT_SECURE_NO_W... (by seeplus)
Storing words into an array from a file in reverse order, and write into a new File.
 
So, I'm currently trying to figure out how to open a file that has a ton of different words of diffe...
[17 replies] Last: @OP Despite your green tick an interesting problem arises if all the... (by againtry)
by dutch
Class function updating 2 variable
 
You need to post something that demonstrates the problem instead of some random crap.
[2 replies] Last: The compiler is your friend: it tells what is wrong or likely to be wr... (by TheIdeasMan)
Database integration help?
 
Can someone offer some time on how to develop an application A-Z and how this works? Currently in sc...
[no replies]
is it safe to use memcpy to serialise/deserialise PODs?
 
Hi I need to serialise and deserialise some POD structs. I was planning to use something like the f...
[3 replies] Last: > Binary is far superior to text in performance and space. > if you do... (by JLBorges)
appropriate way to deal with compiler warning non-void function doesn't return value in all paths
 
Sorry if this has been asked, I didn't find it. Working through Bjarne's PPP and using g++ on my mac...
[16 replies] Last: Thanks, Andy. No, it's part of this calculator code project. I wasn't ... (by mac10warrior)
Print Minimum and Maximum n-digit numbers whose sum of digits equals to given sum
 
Hello, I would like to print the minimum and maximum n-digit numbers whose sum of digits equals t...
[10 replies] Last: My try; #include <string> #include<iostream> #include<vector> using... (by oggin)
by y19177
A question
 
Can someone have a look at my code? I'm trying to approximate pi by using the formula pi = lim 4*(1-...
[8 replies] Last: You can always add up the terms in pairs - then you will never have to... (by lastchance)
XP value is constant
 
With this the value of xp does not change and I can't tell why. #include <iostream> #includ...
[4 replies] Last: Solution found. Thanks for pointing out that line, @jonnin (by closed account 2LC20pDG)
January 2021 Pages: 1... 67891011
  Archived months: [dec2020] [feb2021]

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