Beginners - February 2021 (Page 5)

type casting
 
question How can a struct be converted to a pointer when struct is 8 bytes(4 x 2) bytes and a poin...
[10 replies] Last: The (node*) part is a cast to interpret the pointer as pointing to a n... (by Ganado)
Use of same class in multiple functions
 
I have a couple classes I am using throughout various functions. However, I keep creating a new inst...
[3 replies] Last: Thanks Handy Andy, that is very helpful and I believe points me in the... (by michaelwilliams6511)
Int variable not updating
 
I was just messing around and reviewing some of the stuff I learned and I noticed that the variable ...
[2 replies] Last: Also here -> https://www.dreamincode.net/forums/topic/420830-int-varia... (by salem c)
Can you help me with this code
 
When i compile this code, i get that c is 40, but I dont understand why is that.. If anyone can help...
[3 replies] Last: This is 'c hacking at its worst'. The result is undefined as it depend... (by seeplus)
Need Help For An Assignment, really new to c++
 
Hey Guys I was wondering if anyone in this forum can help me with this assignment. I'm new to C++ an...
[3 replies] Last: Hello RubixIsCubed, Hey Guys I was wondering if anyone in this forum ... (by Handy Andy)
String array won't work correctly in an if statement
 
Basically the if(array == "Hello ") will not work correctly because each time I enter the input it'...
[10 replies] Last: @Handy Andy, thank you, it helps a lot. I was not sure about the synta... (by possum swallower)
input center and a point on a circle a million times with no correct output
 
I think I may be dumb or missing something. I have attempted way to many times to get this program t...
[2 replies] Last: ... Oh, wow. Thank you. I can't believe I missed that. (by brookeshnook)
by bstroe
Missing element
 
2 strings of numbers : n and n-1 . The elements in the second string will be in the same order as t...
[15 replies] Last: Thanks @seeplus @lastchance ! (by bstroe)
by bstroe
The element are not in order
 
2 strings of numbers : n and n-1 . The elements in the second string will NOT be in the same order ...
[8 replies] Last: In which case, consider: #include <iostream> #include <set> int ma... (by seeplus)
Array sum
 
So I have to create text file from cpp. Everything worked fine before i added functions for array su...
[4 replies] Last: It can also be done as: #include <fstream> #include <iostream> #inc... (by seeplus)
linked list insertion time complexity?
 
I am learning about linked lists, and trying to understand the time complexity behind insertion, del...
[11 replies] Last: Another important consideration for preferring the standard library li... (by JLBorges)
Help me to understand constructors and destructors
 
Here is code that I'm trying to understand #include <iostream> using namespace std; class Studen...
[3 replies] Last: @AbstractionAnon thank you very much, your explanation why only destru... (by d34dc0d3)
vector of queue of unique_ptr
 
Hi I understand that if you want a vector of unique_ptr then you need to use vector.push_back( move...
[4 replies] Last: I didn't say what the problem is, so I'll do that now. vector::push_b... (by mbozzi)
Problems printing Unicode characters in Windows
 
How do I properly format the wcout statement with the L switch in my example code? As it is, it just...
[16 replies] Last: Yeah when i use the actual characters I get garbage. the only thing th... (by Justcus)
Implementation
 
Hello, I have to write a code and write a page to explain my implementation. But what does it mean...
[1 reply] : You're explaining the details of how your code works. Like what algori... (by Ganado)
Random number problem
 
I'm having some trouble getting random numbers for my code #include <ctime> #include <iostream> #...
[7 replies] Last: That's exactly what I said. Anyway, he said it's fixed now, but didn't... (by dutch)
Read integers from a text file with C++ ifstream
 
So i have text file input.txt. This file consists of 54, 70, 75, 63, 17, 59, 87, 16, 93, 81, 60, 67,...
[13 replies] Last: Yes, that's a good point. I didn't need special treatment for one less... (by lastchance)
Search word from file C++
 
Hi guys, I have been looking all over internet. I'm a noob with C++ so all I can find don't make se...
[19 replies] Last: Ok, I'm looking for options but it seems it's more effective the way i... (by Scorpia)
by icezy
C++ Classes and Overloaded Functions
 
I am trying to create a class name Dog with a string field for the Dog’s name. Create a class Cat...
[5 replies] Last: That is to what I was referring (and polymorphism) above when I mentio... (by seeplus)
Coding Challenge:
 
Why does it cout 1 ? This is the challenge: Doubled Pay An employee working at a very bizza...
[5 replies] Last: Dutch's bit shifting is just the application of the standard formula f... (by seeplus)
February 2021 Pages: 1... 34567... 12
  Archived months: [jan2021] [mar2021]

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