Beginners - July 2021

Sorting Linked List Nodes in order
Write your question here. I'm trying to sort these nodes in order, but the code below seems to be resulting in an infinite loop and I can't seem to find the is...
[10 replies] Last: The implicit conversion to pointer ( null pointer conversion ) applies... (by JLBorges)
by AkiraC
How to print out something according to the input?
Hi, I actually wanted to print out something according to the character that I typed but it doesn't show it out. Example, When I entered 'A' and its quanti...
[8 replies] Last: Ok. perhaps: #include <stdio.h> #include <stdlib.h> #include <ctype... (by seeplus)
Address of struct and address of first member variable
The address of a struct is the same as the address of its first member variable. struct myStruct{ int number; char ch; }; int main() { ...
[4 replies] Last: > Given that both the struct and the first member have the same addres... (by JLBorges)
here is the code on how to mergesort a 2 equal sorted runs #include <bits/stdc++.h> using namespace std; void SortTwoHalfSorted(int A , int n) { ...
[7 replies] Last: Why did you erase the title text of the thread? Don't. (by keskiverto)
HELP keep getting error C2182 and few others
i have tried everything, cant figure out whats wrong .. here is the code with errors as comments: // file name drawing.h #include"mac.h" void DrawFi...
[4 replies] Last: thanks helios , it worked all i had to do was remove drawing.h and mac... (by Reddevil1003)
Accessing struct member within node of linked list concept
I have created a linked list with a struct Student within a single node of said linked list. Within the Student struct, there are several struct members, namely...
[7 replies] Last: Ok. You already got that: using type = Student; struct Node { type ... (by keskiverto)
How to calculate the time complexity and space complexity
Hi, may i know how to calculate the time complexity and space complexity of this code #include<iostream> using namespace std; struct Run{ int firs...
[3 replies] Last: yes, N*N and N^2 are the same thing :) remember this stuff can get w... (by jonnin)
what do have to do?
Hellofire1234, Since there is not enough code to compile and test I would have to guess that "main" calls "whatsx", which is only a copy of the variable,, but ...
[1 reply] : fire1234 Op Original post. int whatsx(int x) { std::cin >> x;... (by Handy Andy)
by AkiraC
How to sum up the numbers in loop?
Hi, I'm new here, may I know how to sum up numbers in loop? Example, for quantity of product A, I inserted 1, then loop, the second time, I also inserted 1, so...
[8 replies] Last: @Handy @seeplus I had change the code according to your codes, and it... (by AkiraC)
Trying to implement HWID Checker
I want to check if hwid serial code (HWID) is valid from std::vector<std::string> list but I can't get it to work. Here is what I have tried. however, it does ...
[1 reply] : The string returned by GetCurrentHwProfile encloses the GUID in curly... (by mbozzi)
Static member that contains unique_ptr
Hello everyone, I wrote the following code to regenerate the problem I met: I'm trying to have a static member ("accommodation") that contains unique_ptr. Wh...
[4 replies] Last: It's not entirely clear on what you're trying to do. However, I'll ju... (by kbw)
Please Describe the Below function
Anyone please describe the following C++ code,i.e What is it doing class LightingManager { private: friend LightingManager & LightMgr(void); st...
[4 replies] Last: That's naming the object explicitly. In your code, you need it becaus... (by kbw)
Hi guys, I'm introducing myself to classes in c++. Here in this example, I 've created a class "particle" ( which contains as protected data members the mass an...
[2 replies] Last: thanks mate, I will check it! (by Zhylian)
Hello everyone i am running Ubuntu 20.04 LTS and really would like to learn C++. So i downloaded build-essential and it was great. I could build a simple '...
[1 reply] : Seems like you were 'informed' by someone who didn't know what they we... (by salem c)
Code about converting seconds into a stopwatch.
AFAIK this code is finished, but is there anything i can do to make this code run any faster? #include <iostream> using namespace std; int main() { ...
[6 replies] Last: Here's something that you can do to speed things up (and make speed-te... (by newbieg)
Error: cannot convert ‘std::vector<double*>’ to ‘double*’
I am trying to convert a malloc to std::vector This was the original initialization in my code double *ne; ne = (double*) fftw_malloc(nx*ny*sizeof(dou...
[14 replies] Last: @JamieAL, Can you provide some sample input and output? The ability ... (by mbozzi)
Trying to get a simple menu to appear
I have been an embedded designer for years and was trying my hand at c++ for windows, just for curiosity purposes and not really for development. I am reading ...
[6 replies] Last: You should already be familiar with the original Windows data types. h... (by George P)
by yasab
Why do I got RM 0 for the total charges? /// This program that calculates the total cost of a hotel stay. ///The daily base charge is as follow: /// De...
[9 replies] Last: If you use functions for input, this greatly simplifies the program. C... (by seeplus)
Using member function pointers inside a class
Hi, I am trying to implement member function pointers in a class. I tried to work it out in a project and got plenty of errors. Now, I have written this small c...
[6 replies] Last: > I believe because function names by themselves are pointers to the f... (by JLBorges)
Looking for teacher.
A good on-line learning resource is:
[no replies]
July 2021 Pages: 123... 7
  Archived months: [jun2021] [aug2021]

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