Beginners - October 2021 (Page 2)

problem of a simulator
 
solved.
[1 reply] : > printf("A = "); int a = (int)(fgets(buff, 64, stdin)); > printf("\n... (by salem c)
Pointer program that creates a memory map table
 
For a HW assignment I have to use an incomplete program with pointers to create a memory map table. How do I use a loop to create a table for this program? Prom...
[2 replies] Last: @seeplus cout << setw(15) << "Variable" << setw(15) << "CONTENTS" <<... (by gigacapybara)
the sequence of including headfiles
 
the sequence of including headfiles may affect the success of compilation. and now i am wondering if it is important to include headfiles in a particular seque...
[2 replies] Last: No, the ordering of standard library headers should not matter (assumi... (by Ganado)
help with _getch()
 
Hello! I am doing a work on project, during travelling I use my phone IDE (Cxxdroid) and when I am at home I use my laptop. For detection of keyboard input I ...
[1 reply] : Both _kbhit() and _getch() are windows functions. How do get it to wor... (by coder777)
the confusion on c library
 
that is the description of c library in the website Reference: The elements of the C language library are also included as a subset of the C++ Standard library...
[3 replies] Last: Right, round also exists in the C standard library, so perhaps it wasn... (by Ganado)
Orphaned process doesn't receive SIGHUP
 
Hello! I have this simple fork code: int main(int argc, char const *argv ) { pid_t p = fork(); if (p == -1) { printf("error in fork leade...
[1 reply] : https://linux.die.net/man/2/getppid Change this line. printf("test,... (by salem c)
by ALNLAA
A little help with switch statements
 
So i have a task : enter N , and a "social score". After which you write N amount of marks, for an F you get "-5" score , for a D "-3", for a C "-1" , and for ...
[6 replies] Last: Friendly tip: When you say "it doesn't work", tell us specifically wha... (by Ganado)
by acprog
Show the array (nxm) and navigate it with cursor
 
Is there any way for showing a bidimensional array and navigate it using cursor - in console? I mean, show array is easy. But return with cursor How can I do...
[3 replies] Last: It isn't especially hard, but it isn't simple. However, this is my re... (by Duthomhas)
by Jhokuu
[issue] code not reading for loop properly
 
An assignment from school that I'm having a little bit of issues with. The output after the first rotation of information input doesn't allow for the input of t...
[2 replies] Last: #include <string> #include <iostream> constexpr size_t array_size {... (by seeplus)
urgent help with input problem
 
need help urgent. if the user enters y, or Y output = you are enrolled if the user enters n, or N output = you are not if the user enters anything el...
[1 reply] : The user can theoretically type in bad input, such as "abc", so you ne... (by Ganado)
How can i print argv
 
Hello How can i print all value for argv? Is this code are ok? Doest i need a terminal to see the result, or i can see it in c++ compiler? #include <stdio.h...
[2 replies] Last: https://en.cppreference.com/w/cpp/utility/program/EXIT_status (by ne555)
by derpus
Cannot output ansi colour codes with fstream
 
I'm having trouble with the outputting of strings containing ansi codes. #include <windows.h> #include <iostream> #include <fstream> #include <string>...
[13 replies] Last: > if anybody could explain to me why using the '\e' in the text file d... (by salem c)
by sito20
Sales_item.h: no such file or directory
 
Hello all, I recently began teaching myself c++ with a book, c++ primer, and I just started with classes. But when I try compiling my file I get this error m...
[2 replies] Last: I found a link to a file with the header name on a subsequent page, th... (by sito20)
by jeyc
c++ login system
 
I'm new to c++ and I'm trying to create a login system for my school project this is my code: #include <iostream> #include<ctime> #include<string> #inc...
[1 reply] : welcome! please put code tags around this, edit your post and highlite... (by jonnin)
Can't handle signals after changing process group
 
Hello guys! I have this little code: struct sigaction sa; void signal_handler(int signum); int main(int argc, char const *argv ) { struct sigaction sa...
[1 reply] : https://man7.org/linux/man-pages/man2/setpgid.2.html Scroll down to th... (by salem c)
Error trying to use a for loop with input validation using tolower() and .length()
 
*Disclaimer* This is a homework assignment, I asked my teacher about the issue and he gave me great advice, which I took. But I am stuck with the formatting of ...
[10 replies] Last: Just keep posting in this thread, starting a new thread is ultimately ... (by TheIdeasMan)
by Jhokuu
Running into a snag with an error
 
so my goal here for this assignment is to re-arrange my array from largest to smallest I'm aware my code isn't quite there yet however I'm getting stuck on this...
[2 replies] Last: foo.cpp|50 col 16| warning: unused parameter 'arr' [-Wunused-paramete... (by ne555)
Normal distribution random values sum to 1
 
Hello everyone, I need a small help. I need to generate random values between 0 and 1. They must be successively ordered. Let me give you an example. Starting ...
[15 replies] Last: @ lastchance,no, it is not you, it is me who could not explain the th... (by learner999)
by mar99
Searching string for a partial string, using structures: displays both 'found' and 'not found' statements?
 
This is for a program that uses structures to store data. customer is the structure that holds data for customer at index k, and it is looking through the stru...
[15 replies] Last: Perhaps (not tried): void findCustomer(const string& name) { size_... (by seeplus)
by BigTim
Making a bank account display certain amounts
 
This is my first year taking coding so I'm a bit confused cause I'm currently trying to work on this homework assignment that's a little late lol. I can make my...
[1 reply] : sorry, what do you want it to do? Explain exactly what you want ... t... (by jonnin)
October 2021 Pages: 1234... 7
  Archived months: [sep2021] [nov2021]

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