Anonymous
clangd will point them out
olli
please consider sharing code instead of pictures of it
PO
olli
1. It's better not to use VLA, as this is an optional feature
2. your matrix has 3 columns but your loop goes until column * 3 hence you access memory out of bounds and invoke undefined behavior
PO
PO
I'm trying
PO
Nothing change
PO
I must to sum 3 consecutive element of each raw because each 3 element is one px
PO
C (Red , green , bleu) = each color equal to one element of raw
Patrick
Hello, I'm unsure if this is appropriate to ask on the group, about ncurses.
I'm making a terminal REPL, but once it closes its buffer is written over by the shell. How can I prevent this?
The real problem I'm trying to solve is getting key presses without pressing enter and ncurses can do that. I used to have a snippet of C code that did it but it isn't restoring my terminal settings anymore.
kky
😳
kky
kky
write(1, "\33[H\33[2J\33[3J", 11)
kky
like this command in the bash: echo "\033[H\033[2J\033[m"
Roshan
Hi
Patrick
run clear ?
Wouldn't clear... completely blank my screen?
Patrick
I want to preserve my ncurses session after my application closes
Anonymous
Is there any STM32F1 freelncer?
Anonymous
@Ranjiith are you know about c??
Surya
Chirag
Hey! Can anyone suggest me a book for learning Data structure using C++
Chirag
?
Anonymous
Morning guys would like to know is there anyone who can code on metaeditor like create a robot from a certain indicator
Anonymous
How can i activate clion if im a student?
Anonymous
Oh oke
Anonymous
So then how will i do it?
Anonymous
Wisenky
Just sign up dude
Anonymous
The error message is clear enough
Anonymous
Class tool{
Private:
Int a, b;
Public:
tool(int val, int val2){//here
a=val;
b=val2;
}//to here
};
Isnt there a shirt method to assign values using colon like this tool1(int val, int val2): // dont know the rest
Anonymous
Help
Anonymous
tool(int val1, int val2) : a{val1}, b{val2}
{
}
Anonymous
Anonymous
//header file
Anonymous
#pragma once
#include<iostream>
#include<ctime>
class Date{
private:
int day,month,year;
public:
void init();
void print();
void init(int,int,int);
};
Anonymous
//cpp
Anonymous
#include"Date.h"
void Date::init(){
struct tm *pointer;
time_t timestore;
std::time(&timestore);
pointer=std::localtime(&timestore);
day=pointer->tm_yday;
month=pointer->tm_mon;
year=pointer->tm_year;
}
void Date::init(int day,int month,int year){
this->day=day;
this->month=month;
this->year=year;
}
void Date::print(){
std::cout<<month<<"-"<<day<<"-"<<year<<std::endl;
}
Anonymous
//main
Anonymous
#include<iostream>
#include"Date.h"
int main(){
Date d;
d.init(10,12,2020);
d.print();
}
Anonymous
its giving me this error(image uploading) anyone can help what went wrong?
Anonymous
Dima
do you have your cpp file added to the pipeline?
Anonymous
what does that mean ?
Dima
it didn’t link that code so it can’t find it
Anonymous
i created .h and .cpp file sperately and included header in cpp
Anonymous
how to connect it then?
Anonymous
in visual studio code i didnt see an option to create a new class so i created a seperate cpp and .h files
Anunay
Not until you share any piece of code
Anunay
And what is the doubt?
Anonymous
/get cbook
klimi
i formatted it for ya
Sameer
Hello guys I'm the beginner in this group can anybody tell me about book from which can I learn from the beginning
piggyho
Sameer
Nope bro
Sameer
Some one suggested me about this
piggyho
piggyho
Nope bro
you might want to try that first, these question have had discussions recently. it would be an easy search
Anonymous
Thank u i, ll look it up
FOTTY 76
Hello
klimi
Patrick
(Thanks for the reply but I eventually ditched ncurses as I got my C snippet working)
@unchanted
How and when to use #pragma once
And ": :"?
@unchanted
How to know that weather we have to use pragma or ": :"
@unchanted
They are different from each other, right?
@unchanted
@unchanted
the above picture describes how spoaling( simultanious peripherial operations online) works in OS and is considered to have better performance than batch processing...
my doubt is, why are we taking input inside the disk and then again sending it to the memory so that CPU can perform the calculation on it, how is it making machine to work faster? why not we just directly send it to the memory management so that CPU can calculate directly?
Anonymous
@unchanted
oh sorry, but i had no other group where i could discuss my doubts so i asked here
Alex
@unchanted
@unchanted
@unchanted
@unchanted
how does this affect my code?*