ברני
Help, I wrote a code on c Programiz online, and refreshed by exident.. I can't recover it? 🥺
Anonymous
Can we post a code or the code link here ....I need some help!?
olli
Can we post a code or the code link here ....I need some help!?
Yes, use pastebin services (e.g. https://paste.ubuntu.com/ or https://godbolt.org/) to share code
Anonymous
https://paste.ubuntu.com/p/MCz4cgctnn/
Anonymous
https://paste.ubuntu.com/p/MCz4cgctnn/
Here is an amateur code in c++...can someone help me in making it more efficient🙏
Anonymous
Please do(personal message ) me if you have any queries regarding the code problem
Hadaward 'Solly'
#rules
Little
Little
Why does it show error??
ברני
Y do you write void up in the() of the main? If you write a<0 It means the number is smaller then 0 what means negative. The return is off also. Do return 0; for this one
Xudoyberdi
I'm a beginner, so is this code to check whether user is inputting negative number or positive number?
Talula
Don't put spaces in file name.
ברני
#include<stdio.h> int main() { int a; printf("Enter a num:" ) ; scanf("%d", &a); if (a>=0){ printf("\nNumber is positive. "); }else { printf("\n umber is negative. "); } return 0; }
ברני
Look your mistakes and learn please
Talula
I compiled mine before sending
And your filename had spaces?
ברני
And your filename had spaces?
Hmm didn't do a file name just the code
ברני
Anonymous
/report screen photo
Manav
https://support.microsoft.com/en-us/windows/open-snipping-tool-and-take-a-screenshot-a35ac9ff-4a58-24c9-3253-f12bac9f9d44
Little
Thank u all
Wojak
Photo from Ishant
Little
I can't see my workspace in codeblock How can i fix it?
Wojak
/get ide
Xudoyberdi
I can't see my workspace in codeblock How can i fix it?
You can message me private, I code with codeblock
Little
/get
Dima
lmao
Manav
O.o so sharing links to internal chat is not allowed
Dima
yes its funny, removed warn
Manav
lmao
Thank you haha
Георгий
hello
Георгий
please heeeeeeeeelp
Георгий
how can I str{12345678}
Георгий
Break to str{1234} {5678}
Dima
lol
Георгий
split
Георгий
on N equal parts
Anonymous
Open docs
Vlad
split
google string_view
Vlad
it allocates new string and copies contents
Roxifλsz 🇱🇹
👍
Anonymous
i want to store a class object in sqlite3 database. any idea how to do it. i have tried creating individual columns but it does not solve my purpose. Also i wanted to know how to create a callback function to just return a single column.
Anonymous
i did most of the answers were suggesting to use hiberlite.
Anonymous
Anonymous
serialize your type to json or binary, and use appropriate type in db
can you give an example ? i don't know how to do that
Anonymous
can you give an example ? i don't know how to do that
like if i have converted my object to a binary file then how do i store it in database ?
Alex
Alex
I used boost serialization for example
Anonymous
oh okay thankyou
#define CLEAR_BUFFER while ( getchar ( ) != ’ \n ’ )
Hadaward 'Solly'
Photo from Ishant
this pic always made me wonder why OOP comes before DS and algos
Wojak
this pic always made me wonder why OOP comes before DS and algos
Say you want to create an instance of a class having knapsack problem or traveling salesman problem code ( I was asked recently the same in the interview)
Wojak
That's algo and oops both
Hadaward 'Solly'
That's algo and oops both
for sure. e.g. in my case I had both oop and DS courses in the same period. Just dunno why OOP is treated as priority.
Wojak
Because only C/C++ allow you to create struct and union(instances without class) As for java programmer, OOP knowledge is compulsory. Thus if you someday switch to java, It is mandatory to work with classess
Wojak
Thus struct privilege ( creating instance without a class ) is not available in all languages
professor
Hey guys . Could help me with logic?
Valentine
Hey guys . Could help me with logic?
Stop asking meta questions
Alex
regarding OOP - you should not use it for every task. this is just typical approach nowadays. its about marketing, trends, not to spend time for choice, typical well-known solution for everybody etc
Hadaward 'Solly'
Hadaward 'Solly'
but as Alan Kay himself stated, it's not destroyer of problems. DS know-how comes first.
professor
Stop asking meta questions
how can I improve my logic if there is a url timeout exception log the url in a dict in-memory , and put into the queue again , and add a counter for each link not exception level? https://dpaste.org/zhCc#L15,18,19
Hadaward 'Solly'
#ot
professor
Yeah, but with the logic
Anonymous
I want to learn c language easily can anyone help me
Dima
You can’t learn it easily
Dima
It will take years