Category : carriage-return

Surprisingly I didn’t find an answer to this seemingly very common problem. In Python when I print something to the CLion Console when the printed text is longer than 80 characters, an automatic line break is inserted. In hexadecimal I can see the inserted symbol is carriage return (0D 0A) on Windows. How can I ..

Read more

I have two dev machines, one Debian, the other Windows 10. I’m having trouble with the Debian laptop (hardware) so I’m temporarily trying to move my work to Windows. I’m far more comfortable with Debian. I’m running make docs on ReStructured Text files in my client’s repo. I should say here that I’m a newb ..

Read more

#include<cstdio> #include<iostream> #include<cstdlib> #include<conio.h> #include<cstring> using namespace std; int main(){ char *ptr; int n=1,i=0,value; ptr = (char*)calloc(n,sizeof(char)); while(1){ value = getch(); cout << char(value); if(char(value) == ‘$’) break; ptr[i] = char(value); n++; i++; ptr = (char *)realloc(ptr,n*sizeof(char)); } cout<<"nnYour text is…n"; for(i=0;i<n;++i) cout<<ptr[i]; cout<<strlen(ptr); return 0; } So everything works as expected until i hit ..

Read more