Beginners - August 2021 (Page 3)

by Wenzi
Loops and arrays
Write a program that receives the number of students the users wants to enter as an input. Next, the program should ask the users to enter the marks that each o...
Aug 16, 2021 at 4:06pm
[2 replies] Last: Hello Wenzi, PLEASE ALWAYS USE CODE TAGS (the <> formatting button)... (by Handy Andy)
Elements appearing in arrays that shouldn't exist
The problem I'm solving involves deleting an element of an array and making sure there are no empty spaces. The program works as intended but while testing it, ...
Aug 15, 2021 at 6:13pm
[10 replies] Last: @Handy Andy, @seeplus, I see. With a proper prompt it's much clearer. (by thmm)
confusion about the parameter of "emplace"
this is the declaration of "emplace": template <class... Args> iterator emplace (const_iterator position, Args&&... args); so i wonder if i can pass multiple p...
Aug 14, 2021 at 8:40pm
[3 replies] Last: It emplaces one element, not elements. The "...args" is a parameter ... (by keskiverto)
by jonnin
Pointers in C
OK :) the concept: assuming you know about arrays (if not, draw back and punt, go study arrays!) then a pointer is the array index to a giant array that we cal...
Aug 13, 2021 at 8:29pm
[14 replies] Last: For what it's worth, the original request was just "to explain the con... (by mbozzi)
Class - inheritance
Hi everyone. I'm dealing with classes. Here I'm doing a class "materialPoint" which inheritate the data-members of other two classes ("particle" and "position")...
Aug 13, 2021 at 10:51am
[5 replies] Last: [quote=Zhylian]I thaught it would be nice to use my older classes and ... (by MikeyBoy)
Help code C not build
void LED_update() //cập nhật dữ liệu hiển thị ra bảng LED { for(int line_height=0;line_height<ScanMode;line_height++) { int count=0; ...
Aug 13, 2021 at 9:44am
[3 replies] Last: Hello damtran2509, PLEASE ALWAYS USE CODE TAGS (the <> formatting b... (by Handy Andy)
switch statement
I am trying to create different data structures based on what the user inputs, I am wanting to use a switch to determine it. But the compiler is giving errors, ...
Aug 12, 2021 at 10:38pm
[5 replies] Last: Hello DonnaPin, I managed this to get the code to work: int main() ... (by Handy Andy)
by bensan
Select, Copy & Paste in PHP & CodeIgniter
We are building a website with CodeIgniter & have created the facility where a user can create their own advert. We are saving the adverts in an adverts folder ...
Aug 12, 2021 at 6:21pm
[11 replies] Last: Thanks @Thomas1965 - Not on server, only localhost. I have the advert... (by bensan)
by vysero
Print std::string
Hey guys, I am trying to call a method which was declared like so: const std::string& getFirmwareVersion() const { return m_ecuFirmwareVersion; } ...
Aug 12, 2021 at 12:12am
[6 replies] Last: As of C++20 <format> requires the programmer to pointlessly allocate... (by mbozzi)
by NowIC
printf() with %p
#include <stdio.h> typedef struct { int x; int y; } point_t; typedef struct { point_t center; int radius; } circle_t; int main(int argc, c...
Aug 11, 2021 at 3:40pm
[4 replies] Last: Parameters which match the variadic position (the ...) in any functio... (by mbozzi)
implement while and for loops in functions to return the first integer
i started to learn c++ with only tutorial from the internet and i have this problem when starting to learn about the loops the question was : The function P...
Aug 11, 2021 at 8:39am
[1 reply] : There is a problem with function p(). If i is not 20, then the return ... (by seeplus)
Reading from file and inserting into existing linked list node
Hi, so I have a linked list with nodes storing student names, course, id, phone number and so on. In the function below, i am trying to read from a file and add...
Aug 10, 2021 at 1:04pm
[9 replies] Last: the problem is the student name, course and phone number of my last n... (by dhayden)
by asees
problem with deletion of a map element and insertion of a new element in its place.
Hello everyone. This question is from the book "Jumping into C++", chapter 19. I have removed "<" from HTML tags, so that the whole question is visible. Wri...
Aug 10, 2021 at 12:09pm
[7 replies] Last: @thmm Thank you for the response. @seeplus Thank you for another sol... (by asees)
C++ class static member variable definition
Hi, I am doing my book book problem right now, "C++ from control structures through objects". I am learning more about classes right now. The first chapter of "...
Aug 10, 2021 at 9:45am
[5 replies] Last: I think you can have your declaration in the header outside the class,... (by malibor)
Not c++ but hope someone can help with git
I am sorry that this is not a c++ question, but I hate to ask on stackoverflow, feels like everyones task there is to make you sound stupid, and here everyone s...
Aug 9, 2021 at 8:20pm
[12 replies] Last: @MyOnlinePersona You have read the man git-push ? https://git-scm.co... (by keskiverto)
by AkiraC
sum and mean of the number in loop
Hi there, so I made this program that ask users to enter a series of number and then the program will show the total number that the user entered, the sum and m...
Aug 9, 2021 at 1:36pm
[2 replies] Last: You need L15-16 within the body of the if statement. As it stands if n... (by seeplus)
Trying to understand what is bad about my code...
So my professor for a beginners c++ class docked me 2 points for a quiz to write a program based on a given 2D array. He gave us that our array had to be initi...
Aug 9, 2021 at 6:42am
[8 replies] Last: #include <iostream> const int COLS{6}; int main() { int sales ... (by againtry)
system("TASKKILL") Processes With Spaces
I'm writing a program that kills a bunch of processes at once (Windows x64). The main question I have is that I'm trying to figure out how to deal with processe...
Aug 8, 2021 at 11:58am
[3 replies] Last: tasklist /svc gives you output like this: svchost.exe ... (by jonnin)
int_max , int_min, leetcode problem
Hello, I am trying some leetcode problems but couldnt solve it and had to look at the solution. But I am a bit confused with it. Mostly the 2 lines with INT_MAX...
Aug 8, 2021 at 3:56am
[2 replies] Last: It's basically to detect numeric overflow and underflow. And because ... (by salem c)
How to make a function to determine whether a point is inside a polygon
Let us say we have a class that represents a point in the plane as two unsigned short integers. Now let us say we have a class that represents a line segment an...
Aug 7, 2021 at 11:46pm
[2 replies] Last: Thank you, I'll try that. (by bergjensen33)
August 2021 Pages: 1234
  Archived months: [jul2021] [sep2021]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.