Pavel
What you're doing is printing the pointer to the file descriptor. It not what you want probably. I'm not familiar with C-way of reading files, but maybe this will be helpful. https://stackoverflow.com/questions/4823177/reading-a-file-character-by-character-in-c
Mihail
It's stdio.h (standard I/O) not studio.h.
Mj
/rules
Mateo
Is it normal practice to write constructors in such way? Or it's a shitty code? https://paste.fedoraproject.org/paste/Xn6r78NO0TQc8D7t4aWysQ
I'm no expert, but I think you could reduce the verbosity in the member initializer lists by using default member initializers
#define CLEAR_BUFFER while ( getchar ( ) != ’ \n ’ )
Hi here.
#define CLEAR_BUFFER while ( getchar ( ) != ’ \n ’ )
please need courses on artificial intelligence in C ++
Алдар
#include <ai>
#define CLEAR_BUFFER while ( getchar ( ) != ’ \n ’ )
Mat
please need courses on artificial intelligence in C ++
Just get AI courses. You don't need them in C++
Алдар
What ?
udacity, coursera, fasti.ai, edx
#define CLEAR_BUFFER while ( getchar ( ) != ’ \n ’ )
Lauri
Can smne explain me debugging using printf
Dima
You shouldn’t.
Dofwfiom
Can smne explain me debugging using printf
Printf its print format Print with format for... It's can be console at your programm
Dofwfiom
If you want i can give more information but it information Conteins bit part of accebler
Dofwfiom
Just to explain how this work
Sai Meghana
when you try to read a string it reads only until space right.. what do you do if you want to read the full sentence?
Sai Meghana
other than using a loop to read until null character... there's no other way'?
Sai Meghana
in C language
Anonymous
I have little bit stupid question :D I am trying some reverse engineering challenges and I need somehow create char[9] (10 character long string) where after adding number 4 I will get 64 ('@')
Anonymous
well, That didn't work out
Anonymous
this is the code, I just need to pass these 2 if statements (puParm2 is the string)
Sai Meghana
What i asked was a doubt.. it wasnt related to your question..
Sai Meghana
I want to be able to just read and print a sentence.. without using the loop
Decoder_3d
https://pastebin.com/QgTnmagd
Decoder_3d
anybody helpme with this code
Anonymous
What i asked was a doubt.. it wasnt related to your question..
Oh... I'm sorry. I'm awake too long, i didn't pay much attention.
Decoder_3d
i am not getting i/p
Decoder_3d
passkey is 100
Decoder_3d
please check
Vasu 🩶
Anybody helpme in 7772 members of this group{write a program to reverse a number without using control statments,loops ,array,only use operators}. ( In C)
Anonymous
that could be impossible
Vasu 🩶
that could be impossible
It is not impossible
Vasu 🩶
It is very easy fo intillegent minded people
Anonymous
It is very easy fo intillegent minded people
there could be some mathematical ways to accomplish it.
Decoder_3d
anybody help me also
Vasu 🩶
Anonymous
What is recursion
calling a function inside of function itself
Vasu 🩶
Anonymous
i am not getting i/p
what's i/p ?
Decoder_3d
input
Anonymous
Then u do this question
I'm not inteligent minded guy :D
Vasu 🩶
I'm not inteligent minded guy :D
Sorry i had not excepted this from u
Itsunknown4u
anybody helpme with this code
Bro try to use classes in this code
Mat
https://pastebin.com/QgTnmagd
Sp many .h headers and a class after them... is it C or Cpp?
__getitem__
can anyone help with this piece of code ? https://gist.github.com/harshraj22/10d1237f8a1395f61fe66f23a8156586 input format can be found here : https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1140
Decoder_3d
Otumian
when you try to read a string it reads only until space right.. what do you do if you want to read the full sentence?
You can use fgets(str, fp) where the string is str and fp is the file pointer.. From fopen(filename, mode)
Sai Meghana
but if we want to read from input during run time?
Sai Meghana
and not from a file?
Elnee
and not from a file?
https://stackoverflow.com/questions/3919009/how-to-read-from-stdin-with-fgets
Itsunknown4u
and not from a file?
Try using printf(" %[^\n] ",....);
Sai Meghana
Try using printf(" %[^\n] ",....);
%[^\n]%*c works. but why is the asterisk placed before c and not before \n ??
Itsunknown4u
Don't place *c
Itsunknown4u
This works
Sai Meghana
Don't place *c
that only worked
Sai Meghana
Just try this
this dint
Itsunknown4u
this dint
Can u send the code
Sai Meghana
char sen[100]; scanf("%[^\n]%*c", sen); printf("%s", sen);
Itsunknown4u
Try doing this
Sai Meghana
char sen[100]; scanf("%[^\n]%*c", sen); printf("%s", sen);
It worked but my doubt is why the asterisk is in that place.
Itsunknown4u
Give a space before %
Itsunknown4u
scanf(" %[^\n]", ...
Itsunknown4u
Do the same while writting printf
Dima
What the
Sai Meghana
Try using printf(" %[^\n] ",....);
that just prints %[^ and then ] in next line
Elnee
What the
Same feelings. Dain bramage :D
kλletaa
i don't think scanf does regex bro