Beginners - June 2020 (Page 2)

by Peon
Uninitialized variable - using functions
 
I can not figure out why when I go to try and compile it tells me lines 31, 38, 45 are uninitialized local variables. They will be initialized with the functi...
[2 replies] Last: Hello Peon, At first I wanted to write this as you did your code, so ... (by Handy Andy)
Question about functions that have :: in them
 
Hello, this is my first post on this website. I'm very interested in programming and I'm also learning python. However, on a website (Edabit) where I'm trying t...
[1 reply] : https://www.learncpp.com/cpp-tutorial/2-9-naming-collisions-and-an-int... (by George P)
Using Uninitialized Memory
 
I've been working on a console game where you play as a fighter, and recently added a "save" feature. Since adding that and slightly changing one of my function...
[6 replies] Last: Yes, it was an object lifetime issue. I'll look into smart pointers. ... (by devious dm)
by totoo
pointers/namespace/class
 
how might i use namespace here? Develop software using dynamic arrays (using the new and delete operators) that allows a user to enter the names of the athleti...
[2 replies] Last: typedef struct is ancient/C code. you do not need the typedef anymore... (by jonnin)
by rock33
Array not work (stupid question)
 
hi community, i have a problem with array, i don't understand because it go in Segmentation error. class Graph { private: int nodes; int edges; ...
[6 replies] Last: thanks for all :D (by rock33)
Getting a program to either terminate or re-run based on user input
 
Hi everyone, I'm still fairly new to c++ and am having issues getting my program to perform another calculation, or to terminate based on user input. I'd real...
[3 replies] Last: Hello SeanDolla1999, PLEASE ALWAYS USE CODE TAGS (the <> formatting... (by Handy Andy)
please help me
 
how do i change this digital clock to car odometer in a car traveling 1 mile every second. Using nested loops and have one loop per each digit in an odometer t...
[3 replies] Last: You have a car travelling 1 mile every second?! Crikey, where did you ... (by jonnin)
Regarding Template class
 
Hi all, I have a doubt in using normal class and templated class. Why do we use formal template syntax to each individual function. How it differs from us...
[2 replies] Last: @Toasty, "instantiate" (create an instance of), not "substantiate" (pr... (by dutch)
Create a class called Complex for performing arithmetic with complex numbers.
 
I have this assignment: Create a class called Complex for performing arithmetic with complex numbers. Complex numbers have the form: realPart + imaginaryPart...
[5 replies] Last: You should really be returning const char* if you want to return a str... (by TheToaster)
First project
 
Ok so I am just beginning a Project and i have a plan what it should be able to do. I am super bgeinner but i usually am really fast learning and get into stuff...
[2 replies] Last: C++ would most likely be a silly choice for this task. (by mbozzi)
Help with a school project for calculating distance
 
I have to write a program that calculates the distance between two points using the distance formula. I am trying to use pow but I don't think that I am doing i...
[2 replies] Last: Hello Alex4321, #include <iostream> #include <iomanip> #include <cm... (by Handy Andy)
return in function in c++
 
Hello, return type in DeleteFromQueue is int. My code is not compiled. because in "else" I should return something. How can I fix it? Thanks int D...
[1 reply] : bool DeleteFromQueue(int& returnedVal) { if (!isEmpty()) { re... (by Repeater)
Display Data in txt.file
 
Can i have a simple code of the user enter the data (name) then it will display the entire information of it?
[6 replies] Last: Hello rhap123, I have asked for the instructions, description of what... (by Handy Andy)
Best way to initialize a matrix inside a struct in c.
 
Hi! What is the best way to initialize an 2d array inside a struct in c? I tried this but I'm getting an error message: #include <stdio.h> struct node { int...
[7 replies] Last: Because then you could do void init_node(struct node *n) { stati... (by salem c)
class templates
 
I am trying to make my own stack class as a beginning exercise, but so far I am stuck as to why mu IDE 'doesn't like' what code? If I put the functions in with ...
[9 replies] Last: My next project is to build on my stack experience and implement a cir... (by jamesfarrow)
Write a C++ program to convert a distance given in feet and inches to meters.
 
Hey guys! My instructor gave us an assignment to Write a C++ program to convert a distance given in feet and inches to meters. The problem is that he hasn't sho...
[6 replies] Last: Went out of my way to over complicate things BUT i did post the shorte... (by Nahpets)
if/if-else/if-else-if/goto etc
 
Please help with my HW. So as it goes below: Solve the equation a+b-c which will be repetead X10 times, a,b,c will get random values from 1-10 interval. Follow...
[6 replies] Last: That's unfortunate that you haven't learned the while() loop yet. Yo... (by dhayden)
by rock33
invalid use of non-static member function
 
Hi Community, i need sort after inser elements, but after the shell show this error: error: invalid use of non-static member function ‘int compare(cons...
[9 replies] Last: I thought my problem was about ordering the graph, but that's not it. ... (by rock33)
by Peon
Stuck in loop? Program stopped.
 
So I modified my code according to helios corrections and then made some further modifications. Now I can't seem to see why but the program just freezes or mayb...
[4 replies] Last: Don't put yourself down. We've all been there. (by helios)
I need to parse (100k+, 1-3KB binary data files); any advice?
 
I'm embarking on a project to extract data from many sensor binary data files. There are many of them (~27 million total, ~1-3KB each) but they're well organize...
[3 replies] Last: Ok. Threading it will certainly go faster if each thread handles one ... (by jonnin)
June 2020 Pages: 1234... 12
  Archived months: [may2020] [jul2020]

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