pavel
Com port is just a file with some additional control register
Osoroshi
Osoroshi
I'm trying to use it in .dll
I made a function when it is called, the value is read from Com Port. In the console application, everything works well, but .dll freezes and works not as it should be
pavel
It's not related with dll
Osoroshi
How can I knit my device with a program ?
pavel
I can guess that you are waiting infinite for a new bytes to read, but nothing to read
Leou
can anyone suggest me some good books about C. i dont like watching videos that much. i prefer books. Can anyone plz help me.
pavel
pavel
Mistake with mouse cursor?
Osoroshi
Yeah
pavel
Your com port interpret data from com port as input from mouse. You didn't disable interpretation of com data as command flow
Osoroshi
pavel I solved the problem. I received the name of the variable and its meaning from Com Port. Everything worked only when I took several variables. When I took one variable, the value was read only once. I did not clean the name buffer at the end of the function 😅
Osoroshi
Thanks for some explanations, I found the problem faster thanks to you
Anonymous
r
programming for embedded systems
r
microcontrollers, as an example, but is quite an wide area
Anonymous
Anonymous
Finding unique numbers in a 2-dimensional array in c ) <- Help with that plizzz
Alessandro
Hi
Osoroshi
pavel
mito
use english.
Nikita
Guys, please tell me.
May be is anybody here from Belarus.
C++ now a good option for first language to find a job?
I don’t want to code in another language but now I have see that nobody wants to take juniors on C++ dev.
But by ratings I see that popularity of C++ growing day by day.
xhunter
When we do os << "please enter a value: “;
xhunter
does this string literal goes to the buffer ?
xhunter
Or does it simply get printed without going to the buffer ?
Yamu
D:\C and C++\collect2.exe [Error] ld returned 1 exit status
Yamu
When I compiled my code, the message show like this! I do not know how to solve it.
Yamu
\Device\NUL
It will not flushed if it encounter newline, it will flushed before reading from istream. std::cin.tie() but it only affect on windows console
\Device\NUL
I dunno if its still same as Microsoft prepare migrating to new console
pavel
줄리아 우지야노바
Anonymous
It will not flushed if it encounter newline, it will flushed before reading from istream. std::cin.tie() but it only affect on windows console
There are many situations where a buffer is flushed.
- when the buffer is full obviously
- when the ostream is tied to another stream. Cin and cerr are tied to cout by default. So when you use these streams, cout buffer will be flushed.
- use of manipulators like endl which don't change the behavior of the stream and apply only to the situation where they are used
- use of manipulators like flush which change the property of the stream and causes it to be flushed everytime
- when the program ends by calling exit(). Abort or quick_exit or terminate won't flush the buffer
- when main returns normally
Anonymous
\Device\NUL
?????
Sorry, i feel that's not related with Classic Windows Console API that deprecated due Virtual Terminal sequences
\Device\NUL
My friend said MSYS/MinGW console is different.
printf("input 1)"
scanf("")
printf("input 2")
scanf("")
Before user input something, it will print input 1input2 cuz it's not flushed untill its buffer full.
That's not a problem with iostream cuz std::cin.tie(&std::cout) is the default
\Device\NUL
xhunter
ostream* old_tie = cin.tie(nullptr); does this untie the cin stream from any ostream object ?
Руслан
Hello everyone, I'm doing practice and the question arose, how can I repeat the function request several times in Google tests?
Руслан
Is there someone alive?
pavel
klimi
void
zombie mode
Eyvaz
hello everyone,
how to use less memory?
Should i use calloc instead of regular array?
int arr[MAX];
int* arr_ptr = (int*)calloc(MAX, sizeof(int));
Eyvaz
Maybe my question is wrong, i want to know what is the difference
Eyvaz
Does it affect to speed
void
arr -> stack
*arr_ptr -> heap
void
syscall on calloc make it slower
Eyvaz
Eyvaz
thank you
Eyvaz
how can i decrease 4 Kib mem usage
Eugene
Not used scanf and printf (stdio and string
Eyvaz
Eugene
why decrease? if a program for a computer is not important if for a microprocessor then throw out all these libraries or look for ones that take up less space
Eyvaz
Eyvaz
i remembered that i can use short int
Eyvaz
but is there any other Library?
Eugene
Main_set and set=2k
Eugene
according to the program it is not clear why you add 127, it turns out that the lower part of the array is not used.
Eyvaz
Eyvaz
it is impossible to use index less than 0
Eugene
Noooooo
Eugene
Char 0....256
Eyvaz
its unsigned char
Eugene
Nooo
Pavel
Is signess of char specified in C if you don't specify it explicitly as signed or unsigned?
Eugene
Char is char
Eyvaz
more readable
Eugene
char - type for character representation. Equivalent to either signed char or unsigned char (which one is implementation-defined and may be controlled by a compiler commandline switch), but char is a distinct type, different from both signed char and unsigned char
Eugene
Char is char
Anonymous