Beginners - July 2021 (Page 6)

C++ - explain about pointers
 
Hello, I expected the address of the ref should be 1. Because I assigned 1 (*ptr) to the address of ref (&ref). (not value of ref) But the value of ref is ...
[2 replies] Last: as noted, you have confused address of and reference syntax. Unfortun... (by jonnin)
C++ - dynamic array and difference between [] and ()
 
Hello, What are the differences between and () when we want to create a dynamic array? It seems ptr1 assigns first element 20. int* ptr = new int...
[2 replies] Last: L1 ptr is allocated memory for 1 int initialised to 20 L2 ptr2 is all... (by seeplus)
Cannot print the list from the binary search tree
 
Write a program that maintains a database containing data, Name and Birthday. You will be able to enter, remove, modify or search this data. Initially, you can ...
[3 replies] Last: Now is the time to become familiar with the debugger - if you are not ... (by seeplus)
by Etnies
While Loop Add/Subtract from Balance
 
I'm working on a code for a class to add and subtract from the balance based on user inputting D for Deposit, W for withdraw, or Q to quit. I'm very new to C++ ...
[5 replies] Last: #include <iostream> using namespace std; int main() { bool keep... (by againtry)
Which one is better in C++?
 
Hello, Which one is better in C++? before or after main? ( for performance) #include<iostream> using namespace std; int f1(int); int main() { } int f1(int...
[17 replies] Last: [quote=keskiverto]Number of files on modern storage is not a huge issu... (by JRManx)
Why do I get LNK2019 error?
 
I'm writing a program that uses a binary search tree. I'm trying to call on the binary search class in driver however, I get this error where I call BinarySear...
[2 replies] Last: In the future don't just give the code number of the error. Instead, s... (by dutch)
From console to Windows program
 
So I was just wondering, what do I need to do to get from out of console programming, to coding a program with an installer, and graphics and all of that? What ...
[6 replies] Last: It would probable be worth reading up on this... Windows App SDK Th... (by closed account z05DSL3A)
by Hyung
How to find average from each column ?
 
I have a file that contains rows and columns 2456 128 234 67 2368 200 249 70 2655 212 250 89 I need to find the average for each column. This...
[6 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <v... (by lastchance)
How to modify and search for a values in a tree?
 
Write a program that maintains a database containing data, Name and Birthday. You will be able to enter, remove, modify or search this data. Initially, you can ...
[5 replies] Last: I did not read the wall of code, but if this is a search tree, modific... (by jonnin)
Binary operators (1,2)
 
I studied this on internet that Binary operator && has higher precedence than ||: For example, consider the following expression. a || b && c || d; // Eve...
[20 replies] Last: > If calling f() first changes the value of h(), or vice versa, then ... (by JLBorges)
Function is not a memeber of for a Tree class (CS2039). (1,2)
 
Write a program that maintains a database containing data, Name and Birthday of your friends and relatives. You will be able to enter, remove, modify or search...
[20 replies] Last: > MS VS even gives the column number! Every compiler gives the column... (by JLBorges)
Help creating a class based on tests it must pass
 
Basically what the title says, I'm new to classes but know the basics. However I have found a problem that requires me to create a class named "Sheep" based on ...
[1 reply] : Lines 17, 19, 32: You refer to a function named id() which is presuma... (by AbstractionAnon)
by bensan
Where to download C++ software? (1,2,3,4)
 
I am wanting to learn C++ but I am unable to find a site to download the software. There are many sites for IDEs but I prefer my current text editor. Can any b...
[63 replies] Last: Another FYI, use the preview button a lot. Except for the initial pos... (by deleted account xyzzy)
XOR Paths
 
You are given the following: A tree T consisting of n nodes An integer x Each node has some value w associated with it. Task Determine the number of s...
[3 replies] Last: @cool123dude, Rules & Regulations for posting on C++ forums 1:... (by JRManx)
by Mif
How to enable a piece of code with a macro by change to debug or release
 
Hello guys I have a short question, that I need to understand. I just want to enable a piece of code in the entire project that works only in debugging mode. so...
[9 replies] Last: Ahh okay.. perfect. I set that in the command line arguments.. and it... (by Mif)
Heap Corruption?
 
Hi. I've been reading about various signal errors, and heap corruptions. I'd like to know what the various types of heap corruptions are (like I've seen detecte...
[3 replies] Last: Thank you so much. Those tools are extremely interesting and seem very... (by AnonymousPenguin)
Is there an error in my program?
 
I'm writing a c++ program that averages integers in rows using a nested FOR loop, but it's giving me an error? it's saying I need a constant in line 21 where in...
[7 replies] Last: garbage in - garbage out. Print the contents of the array after you in... (by dhayden)
by Patto
Weight reading out by 404.6
 
Hi All I am programming my Arduino with the following code. The reading of the scale when there is no weight is -404.6kg. When I add weight, ie 3kg the increa...
[1 reply] : its unclear because it looks like you already did all that coupled wit... (by jonnin)
Syntax error help
 
Hi my c++ class gave me a problem to: Create a while loop that will call a protect Data Function --> int protectData(string) Function will catch a pro...
[5 replies] Last: Hello Wargrav, You appear to understand using code tags for your code... (by Handy Andy)
class has no member contains
 
Hi, I'm trying to write a program that generates a random letter and checks if a name entered contains it. The problem is on line 12 it says the class has no me...
[3 replies] Last: If you're using C++ random, then the distribution can be from 'a' to '... (by seeplus)
July 2021 Pages: 1... 4567
  Archived months: [jun2021] [aug2021]

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