Alex
Alex
and this one is compiled too
void fn(char ss[])
{
}
int main()
{
char s[60];
fn(s);
}
Alex
Alex
so you can use this function with arrays of different lengths
Alex
you wrote this:
you can pass it as an array, but then your function can't work with arrays of different lengths
Alex
you can work with arrays of different length. I can`t see any problem
Anonymous
Alex
ok, for practice I suppose its ok to use void fn(char s[])
Anonymous
Anonymous
Anonymous
that was my point. you can do that if you REALLY want (preserve the details about the array inside the function), but you will have to do X absurd thing.
Anonymous
Mar!o
Tokin
Btw is metaprogramming in C a thing? Do ppl write code within C code? Or a program that outputs a program
MᏫᎻᎯᎷᎷᎬᎠ
You don't need to overload it
Just use for loop and a std::cin inside it
MᏫᎻᎯᎷᎷᎬᎠ
Oh
Then you need to overload it
Just do this in your class
std::istream& operator >>(std::istream& is){
//Your input
return is;
}
Anonymous
Please tell me best tutorial about c++
Dima
google is the best
I_Interface
Anonymous
hey all please can someone tell me how to write a self protecting programme or software i have tried searching on google i did'nt got a better results if anyone know please answer or even if you know some that could help me it will also be helpful
Alex
what is self-protecting?
Anonymous
self protecting are those which cannot be uninstalled easily like u cannot just go and uninstall it
Anonymous
i call it self protecting b'cause when i searched on google from there i got the term
Anonymous
Anonymous
yes
Anonymous
You write an entire custom driver that enforces the policy
Anonymous
you know?
Anonymous
Then hope nobody boots into safe mode
Anonymous
like hardware level programming?
Anonymous
No
Anonymous
Drivers don't always have to be hardware
Anonymous
is there any other way this is the only way?
Anonymous
Anonymous
Use Linux
Get a TPM
Grow a beard (optional)
Set up dm-verity on your entire system
Enable secure boot and pin the key in the TPM
Anonymous
But this will make the entire system immutable
Anonymous
ok i think first option was good thanks for your reply
Anonymous
Is posix semaphore (sem_wait) is faster than traditional unix v (semop) semaphore?
klimi
Sohit
Anyone interested to know where to practice for programming on a daily basis?
Noor
How to check if terminal emulator support EscapeSequence before printing it?
Asdew
Abishek khanna
How to convert minute to second in c language
Abishek khanna
Any one tell me solution
Pavel
Dima
lol
Anonymous
Am really sorry that was purely unintentional, pocket touch caused this spam, This is very embarassing.😔
destroyed
Anonymous
Hii everyone
Cengizhan
Anunay
Cengizhan
C++ ofc
He asks in C. It was rhetoric.
Anunay
😂
Anunay
C++ Masterrace
Anonymous
this is high performance method
Anonymous
Anonymous
x = (10, 20, 30); // x = 30
x = 10, 20, 30; // x = 10
What's the logic behind this?
Dima
lol
olli
Anonymous
piggyho
Anonymous
if(sizeof(int) > -1)
printf("True");
else
printf("False");
Why does the if condition evaluate to false?
The size of an integer is supposed to be greater than -1.
Cengizhan
Cengizhan
Compile your code with warning -Wsign-compare in GCC and see.
Anonymous
Anonymous
Anonymous
printf(3 + "ABCDEFG")
prints DEFG
The integer is defining the starting index of the string to be printed. Does this work anywhere else other than printf?
Also, where can I find the documentation for this method of printing?
Cengizhan
Tute
Cengizhan
No readability, no maintability etc.
Tute
Anonymous
Tute
Anonymous
Anonymous
@cngzhnp @tute_avalos Thanks 👌
Anonymous
Hey community.
I'm new to programming and I would like you guys to revise my code.
PRECISION: I DON'T NEED HELP, i just want you to check it out.
I'm fan of lambda function in python, and I try to use in C in order to reduce the code-making time.
Just need some suggestions, if I should focus on if...else, or use conditional operator ("?") as much as I can (Specially for small codes)
Anonymous