Skip to content

Conversation

@lesandl
Copy link
Contributor

@lesandl lesandl commented Jul 17, 2017

Bitwise

strcpy(str, string);
printf("%s\n", str);
if (style & 01)
strrev(strcat(strrev(strcat(str, "</U>")), ">U<"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может так:
strrev(strcat(strrev(strcat(str, "</U>")), "<U>"));
?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пробовал так. Но реверс как-то странно переворачивает угловые скобки. Поэтому чтобы конечный результат получился верным, пришлось сделать именно так:
strrev(strcat(strrev(strcat(str, "")), ">U<"));

typedef unsigned int uint_32;
void PrintHtml(char const* string, int style);
uint_32 ParagraphParameters(char* str);
void ParagraphParameters(uint_32 flag);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В Си нет перегрузки функций, в том смысле, что нельзя называть одним именем функции, имеющие разный набор аргументов.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants