Skip to content
Advertisement

Tag: printf

Extracting type info from printf format string

I’d like to extract c++ type information from a printf format string. For example, I’ve attempted this using parse_printf_format() from printf.h, but the returned argtypes don’t appear to include information about signed/unsigned. Is there some way to get signed/unsigned info as well? Answer As I said in my answer, the parse_printf_format is not made for what you need. You can

Linux bash printf format with color assign to variable

I just want a String (including coloring) be formatted by printf command and assign the result to a variable. Without assigning it to a variable it works fine, but as soon as I assign the result to a variable and write the result, the format is gone. My example: I found several solutions for passing the result to a variable

gotoxy() function using printf() ‘s position

Hello there i am working a project which need the gotoxy() function i have read gotoxy() implementation for Linux using printf i wonder why the need to change the x y order in printf, is that just to fit the coordinate system? in my way, i change it to printf(“%c[%d;%df”,0x1B,x,y) to meet my needs stil, during my using this gotoxy()

Advertisement