Golden Age Of
Da
donald
//#include "circle.h" #include <iostream> using namespace std; int main() { int x,y,r; cin>>x>>y>>r; Circle c(x,y,r); int cx,cy; c.getO(cx,cy); cout<<cx<<' '<<cy<<endl; cout<<c.getR()<<endl;
donald
#include "circle.h" #include<iostream> using namespace std; void Circle::getO(int &cx,int &cy) { cx=x; cy=y; } int Circle::getR() { return r; } void Circle::move(int move_x,int move_y) { x+=move_x; y+=move_y; } void Circle::setR(int new_r) { r=new_r; }
donald
#ifndef CIRCLE_H_INCLUDED #define CIRCLE_H_INCLUDED class Circle { private: int x; int y; int r; public: Circle(int _x,int _y,int _r){x=_x;y=_y;r=_r;} //~Circle(); void getO(int &cx,int &cy); int getR(); void move(int move_x,int move_y); void setR(int new_r); }; #endif // CIRCLE_H_INCLUDED
donald
why can't my program run?
donald
can some expert help me?
donald
that's part of the program
donald
but the error happens there
donald
the error is :undefined reference to Circle::get0(int&,int&)
coal
getO is declared but not defined
coal
probably a linker error
coal
are you sure you're including your headers and sources when compiling it?
coal
thank you so much ,you're so fucking smart
oh its just that it has happened to me so many times before lol
Anonymous
Can you all
Anonymous
Guide
coal
h m m m m m m
coal
what kind of..
Anonymous
Me for c++ I am a beginner
coal
i see
Anonymous
Any suggestions
coal
have you tried...
Anonymous
Yess
coal
googling
Anonymous
I now a little
coal
Any suggestions
yeah dont give up
Anonymous
Bit
coal
C++ is a rich feature language, but you dont need to know everything to use it
Anonymous
Yeah that's why I come
coal
I recommend you to start a little project, if you don't know how to do something, you can always google it
coal
how good are you in programming in general?
coal
are you an absolute beginner or you know other language already
Anonymous
No bubby I am a beginner
Anonymous
I started this from one week
coal
hmmm, i recommend you to make a codingame account
coal
there's many easy puzzles to solve if you're a beginner
coal
and if you get stuck you can always google how to do it
Anonymous
Give me
coal
I recommend you to watch some tutorials, because you might need guidance
coal
Give me
codingame.com (im not affiliated with thid website im recommending it from my personal experience)
coal
I recommend you to watch some tutorials, because you might need guidance
for example, you can set a study plan from monday to friday and solve puzzles in the weekends
Anonymous
Thank you
coal
you're welcome
coal
if you have questions or you're stuck feel free to dm me
Anonymous
Ok
Anonymous
It's trusted
Prince Fine
Hey guys I'm still confused about This incremental thing Int i; ++i ; i++ ; Thier d/ce
coal
++i: return the increased value and increase it
coal
i++: increase value and return original
Wizard
👍
coal
int i = 1; printf("%d", ++i); // 2 printf("%d", i++); // 1
Wizard
This code may cause misunderstanding
Wizard
`` int a = 1; printf("%d", ++a); // 2 int b = 1; printf("%d", b++); // 1 ``
Talula
i++: increase value and return original
Well actually, i++ means return the value of i and then increment. ++i means increase the value of i and then return.
Wizard
yes it is.
coal
well nice
Talula
i++: increase value and return original
But you said original value, that could mean it is doing the act of incrementing and then keeping the original value...
coal
`` int a = 1; printf("%d", ++a); // 2 int b = 1; printf("%d", b++); // 1 ``
yeah you're right, i actually meant the printf as separate tests and not sequential statements
coal
But you said original value, that could mean it is doing the act of incrementing and then keeping the original value...
increase value and return original doesn't mean return increased and keep original
coal
thats a misunderstanding from your part
Talula
increase value and return original doesn't mean return increased and keep original
Then how would it return the "original" value if it didn't keep it?
coal
int a = 1; int original = a; return ++original; ?
coal
a return statement is completely independent from the value of the variable
coal
original refers to the original value
Talula
a return statement is completely independent from the value of the variable
I was just saying, they way you put your statement is bit confusing... i++, means return the value and increment later... ++i means increment the value first and then return it...
coal
because value is incremented after returning
coal
but if it was confusing then thanks for the clarification
Talula
Golden Age Of
Are you not?
Prefix incrementation has more priority
Talula
Prefix incrementation has more priority
Yes and in i++ happens after the value is returned... not before it.
Talula
Prefix incrementation has more priority
Sorry I understand what you mean, corrected it.
Anonymous
🙏 @MissRose_bot
Markiyan
Hi guys, could someone give an idea how to implement such thing 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 in 2D array? I tried to do that here, but it was unsuccessful #include <stdio.h> #define n 7 void print(int a[n][n]) { for(int i = 0; i < n; i++) { printf("\n"); for(int j = 0; j < n; j++) { printf("%d ", a[i][j]); } } } void main() { int a[n][n] = { 0 }; for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { a[7-j][j] = 1; } } print(a); }
Anonymous
Hi everyone. I have a problem. I can find -74 but i dont know how to swipe big matris to right. Can you help me please. I cant send pic. Lets think matris1 is 21 19 17 25 28 71 76 73 68 59 153 164 157 155 200 201 190 185 180 205 210 215 230 232 Matris 2 -1 -1 -1 -1 8 -1 -1 -1 -1 First we multiple matris1 * matris2 but size is matris2size then we have to do swipe right. Like we multiple 19*-1 +17*-1+ 25 *-1 + 76*-1+73*8+ 68*-1+ 164*-1+164*-1+157*-1 I hope you guys understand. I cant share pic. So sorry.