Anonymous
I never used nullptr aswell
Anonymous
lol
Dr
Ahh same solution
Anonymous
I am you, but from the future
Dr
Lol
Anonymous
I never used nullptr aswell
Maybe a good time to start, ig
I use Arch
I never used nullptr aswell
And I never use NULL. I place 0 instead of it :)
Anonymous
And I never use NULL. I place 0 instead of it :)
Yes. I hate abstractions too, sometimes
I use Arch
Dr
And I never use NULL. I place 0 instead of it :)
It may cause ambiguity in big applications as 0 may resolved to undefined memory or over the memory allocated for program
I use Arch
Doesn't hello should be of size 2 not 1?
I use Arch
So you need 2 bytes but alocate 1 by "char hello[1 <-here]"
I use Arch
And also you write 10111 & 0xFF to both hello[0] and hello[1]. When you read it you will get 0001011100010111 as I understand
I use Arch
10111 & 0xFF is 10111, isn't it?
I use Arch
You need to write first byte of int16 number to hello[0] and second byte to hello[1] like hello[0] = num << 8; hello[1] = num & 0xFF;
I use Arch
Or not
I use Arch
Wait, I need to test it
I use Arch
short num = 400; // 400 is 0b110010000 cout << sizeof(num) << endl; // 2 char buffer[2]; buffer[0] = num >> 8; buffer[1] = num & 0xFF; cout << (short)buffer[0] << endl; // 1 // 1 is 0b1 cout << (short)buffer[1] << endl; // 144 // 144 is 0b10010000
I use Arch
short result = (buffer[0] << 8) | buffer[1]; cout << result << endl; // 400
I use Arch
This way you can get num from buffer
404
/get
Anonymous
/get
🦈 Mo.Trader 🦈
/print
Ludovic 'Archivist'
Concurrency for nothing Part 2 is well on its way for people interested, it took a bit of time to implement green threads in less than 200 lines of code
Anonymous
/get ide
Seeker
/print
Typing...
Can anyone help me to learn c++ gui
I use Arch
how do u paste your code like this?
Selected text and choose monospace formatting in the context menu
Anonymous
Hello Everyone, I am working on a robot arm and I am doing research on implementing inverse kinematics for moving chess pieces using the arm. I would love to get some help on the algorithm.
Ludovic 'Archivist'
https://archivist.nekoit.xyz/concurrency-with-nothing-part-2/
〽️
#include <iostream> using namespace std; class Restoran { string subeAd; string adres; int masaNo; int saUcret; public: Restoran(string adres,string subeAd,int masaNo = 0, int saUcret=0) { subeAd = subeAd; adres = adres; } ~Restoran() { //yıkıcı fonk. } int tutarHesapla(Restoran&); friend class Musteri; }; class Musteri { string MusAdSoyad; int rezSa; int tutar; public: double Restoran :: tutarHesapla( Restoran&) { //uye fonk.bildirimi return rezSa * tutar; } Musteri(int rezSa =0,int tutar=0) { MusAdSoyad = MusAdSoyad; } ~Musteri() { //Musteri sınıfının yıkııcı fonk. } }; int main() { Restoran rs (3,60) ; Musteri m(4, 50); m.tutarHesapla(rs); }
〽️
double Restoran :: tutarHesapla( Restoran&) What should I write next to the "&" symbol in the "Restaurant &" section here?
Ethan
Needs some directions. Im writing a program that reads a file, i then want to break each sentence into seperate words. I search the length between each space and then try to use the strncpy function, its just too buggy. Any one know how i can solve this?
ARx
try reading characters and when you read a ' ' put a '\n'
Ethan
try reading characters and when you read a ' ' put a '\n'
What is i want to save it into a new variable(array)?
𝙰𝚖𝚖𝚊𝚛
Hello everyone, I would like to ask how could I represent a given string which represents a mathematical expression consists of ('+', '-', '*', '/', and int), as binary tree in such a way that I put the less priority operator in the root. Ex: 2*2+10/2-9 Bt: - 9 + * / 2 2 10 5
Anonymous
you can do order of operations afaik
Anonymous
(2 * 2) + 10 / 2 - 9
𝙰𝚖𝚖𝚊𝚛
(2 * 2) + 10 / 2 - 9
Why would I do that?, That will change the priority of the given operations. The point for what I want to do is that make a simple calculator by recursive and binary tree
Anonymous
Please I love learn C programming but I don't know how
Dima
lol
Anonymous
lol
Yasas
this group is gonna hit 15000 soon
Anonymous
If I have an array of large strings in C++, and I'm iterating over them using for(string s: arr) Does it make any improvements to the performance if I use a reference iterator variable instead? Like string &s
James
Hallo my names is james
James
somebody can help my assignment?
James
create program to input name years of birth then display the data in a table |no|Name|Age|Future use maulud as the calculation to decide a future of each person
James
create program to input name years of birth then display the data in a table |no|Name|Age|Future use modulo as the calculation to decide a future of each person
I use Arch
What is i want to save it into a new variable(array)?
When you read a ' ' save to a new variable (array) a substr of given string (it should starts from index of last space and ends in index of current space)
jk
Training to practice on func that gets dinamic array and I want to make new arr that will contain the same numbers as the last one but without the duplicate numbers . Every time I try to make for loop Inside for loop I get runtime error but I don't think that I'm out of my Range
我是大娃
new class[10];
我是大娃
new class[10]();
我是大娃
Are there any differences?
.
Hey, how can I use gdb to check a shared_ptr truly value?
Pavel
Are there any differences?
Here's some answer that may be helpful https://stackoverflow.com/questions/31186391/using-or-not-using-parentheses-when-initializing-an-array
Anonymous
Can anyone tell how to make face recognition with app lock ?
Shikha
Anyone can help me for coding its urgent now
Olanrewaju O.
Hello guys pls i want to develop an app for an organization for visitors coming into the company to make a request and await approval without coming to the firm 1st.
Anonymous
Hello guys I'm trying to print a double with dropping decimals but it keeps rounding up or down, how can I prevent it from rounding???🤔 Its like below: double x = 203.706 printf("%.0lf", x) Output: 204
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
He want to drop decimals
Ohh my bad i thought he didn’t want the x to change
ARx
ohh x2 srry
MaJed
Looking for vector templates anyone can help me?