Harsh
If you want to write at end, open at end
Surge.rs
Harsh
Anonymous
Thanks ✨
Harsh
If you want a complex example, checkout my school project on file handling:
https://github.com/infinity-plus/School_Project
Harsh
N.B
Anonymous
Harsh
Surge.rs
(someone offers help by giving example) its bad
Surge.rs
like wut
Surge.rs
olli
very true
hence, I don't think "It's not good" was related to sharing the project but rather to the quality of the code
Surge.rs
Surge.rs
just thought it was funny that an example given for file I/O was thwarted away cause its bad
olli
but especially when it comes to IO it's crucial to know what you're doing
olli
otherwise things like heartbleed occur
Surge.rs
Surge.rs
he gave an example of how he was using those operations on a larger scale
Anonymous
It's a good example because his code contains a lot of bad practices
Anonymous
1. The whole code placed in the ONE file
Surge.rs
I didnt say it wasnt good practice. I said it's an example of using files
Anonymous
2. He uses std::cout and std::cin directly
Anonymous
3. The logic and the input tied to each other
Anonymous
http://www.cplusplus.com/doc/tutorial/files/
William
Can someone help me on how to write a cpp function that combines addition,subtraction and multiplication
Ilya
Ilya
Anonymous
What is the error in the (for)?
Ilya
Dima
Anonymous
hello?
Tom
Words with Length N
The program must accept a  space separated string S and an integer N as
the input. The program must print the words from S which are of length N
as the output. If no word is of length N then the program must print -1 as the output.
Boundary Condition(s):
1 <= Length of S <= 1000
Example Input/Output 1:
Input:
Have a good day
4
Output:
Have good
Example Input/Output 2:
Input:
help the need
2
Output:
-1
Tom
Tom
The output is empty for this input..can anyone pls chk
Ilya
Ilya
Tom
I tried ==1 also
Ilya
Ilya
I tried ==1 also
You can't do accidental programming with C++ or C, must learn first
Ilya
Ilya
Ilya
pratheep
Ilya
Поліна
Hi everyone!
Have anyone used gRPC with serialization library other that protobuf? I would like to talk about some details, so please text me :)
I saw example for Java (gRPC+Gson), but it is super language-specific
MengShu
According to the C standard before C99, you need to declare i at the beginning. With C99 and C++, your original code can be compiled.
Anonymous
Anonymous
Mat
Anonymous
fichier.cpp but cant open
Crush_my_love
qwabs
Welcome Qwabhina!
Please read the pinned message 🙂
👍👍👍
klimi
qwabs
Body
Body
I should transfer it to int array how can i do it?
klimi
just input it into array
András
Body
Surge.rs
all char's are integers
Body
all char's are integers
When i try to get integers by scanf("%d"), my code doesn't work. Because there is a symbol 's'
András
Yes
Becouse 's' isn't in decimal number system
András
all char's are integers
Well yes but actually no.
Ofc it is stored as a 1-byte number, but when you start work with streams a lot of changes
Surge.rs
András
Body
Read as char
Further i should work with code by integers in matrix.
Body
And output is in integers
András
So, which number in decimal system 's' represents?
Body
Benedetto Califfo