!SGkzNqBXEJutSYnahE:matrix.org

C

40 Members
C Programming Ask C related questions here.8 Servers

Load older messages


Timestamp Message
16 May 2020
09:11:33@imperator:delubrum.deimperatorYes, natrius was the first to reconnect to the room server since 1992. Afaik he's using an accoustic coupler with a permanent phone session to Bell Labs
20:40:01@amanajayvarma:matrix.orgamanajayvarma changed their profile picture.
18 May 2020
13:12:45@darkmessiah86:matrix.orgDarkMessiaH86Redacted or Malformed Event
13:22:01@darkmessiah86:matrix.orgDarkMessiaH86hello guys...I was playing with ncurses and I have a (probably stupid) question... I am using the function mvwprintw to print a string into a for loop (I want to print this string n times) but the function only prints the first char of the string n times and after that the rest of the string...basically what I want to achive is something similar to this Output: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello but with ncurses I am only able to print Output: HHHHHHHHHHello here is the code: https://pastebin.com/9hBEdhNy Thanks!
19 May 2020
19:50:43@imperator:delubrum.deimperator DarkMessiaH86: What the hell is this? Format.
20:06:54@aladdy:matrix.orgaladdy imperator: No need to be rude.
20:23:34@natrius:matrix.orgnatrius DarkMessiaH86: you could use something like that https://codebeautify.org/c-formatter-beautifier
20:24:10@natrius:matrix.orgnatrius But that does not change that much tbh imperator:
20:25:14@natrius:matrix.orgnatriusAnd, that was not rude. He did not say he is an idiot or something like that. He was commenting on the code. I'm perfectly fine with that, for example. And he even gave critique on what was bad.
20:27:26@dinu:matrix.orgdinu IMHO nothing's better than clang-format
20:27:49@dinu:matrix.orgdinu
In reply to @natrius:matrix.org
DarkMessiaH86: you could use something like that https://codebeautify.org/c-formatter-beautifier
* IMHO nothing's better than clang-format
20:32:32@dinu:matrix.orgdinu

DarkMessiaH86: The problem is that mvwprintw takes grid coordinates, so use something like:

mvwprintw(windows, 0, i*strlen(word),word);
20:33:21@dinu:matrix.orgdinuSo: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello | | | | | | | | | | 0 5 10 15 20 25 30 35 40 45
20:33:41@dinu:matrix.orgdinu * So: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello | | | 0 5 10...
20:36:40@dinu:matrix.orgdinu * So: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello | | | | | | | | | | 0 5 10 15 20 25 30 35 40 45
20:37:21@dinu:matrix.orgdinu *

So:

HelloHelloHelloHelloHelloHelloHelloHelloHelloHello
|        |        |        |       |        |        |        |        |        |
0       5      10    15    20    25    30    35     40    45
20:37:33@dinu:matrix.orgdinu * So: HelloHelloHelloHelloHelloHelloHelloHelloHelloHello | | | | | | | | | | 0 5 10 15 20 25 30 35 40 45
21 May 2020
10:24:39@gbear:matrix.orggbear joined the room.
22 May 2020
00:25:11@foocraft:matrix.orgfoocraft joined the room.
08:05:50@darkmessiah86:matrix.orgDarkMessiaH86Redacted or Malformed Event
08:06:53@darkmessiah86:matrix.orgDarkMessiaH86 natrius: thanks for your suggestion I will use it for sure!
08:07:08@darkmessiah86:matrix.orgDarkMessiaH86thanks a lot for your suggestions guys
08:09:04@natrius:matrix.orgnatrius DarkMessiaH86: Some IDE or Code Editors even have plugins to do that automatically. For example notepad++ https://qnaplus.com/how-to-re-indent-c-code-using-notepad/
08:09:40@darkmessiah86:matrix.orgDarkMessiaH86I managed to fix my problem a couple of days ago using i*strlen(word) as dinu suggest
08:10:37@darkmessiah86:matrix.orgDarkMessiaH86actually I am using codelite and it does a pretty good job...I don't know why the code in the link was so messy....my bad for not double checking it
08:12:30@darkmessiah86:matrix.orgDarkMessiaH86 imperator: I am sorry the code wasn't of your taste, it will be more elegant in the future
08:56:32@darkmessiah86:matrix.orgDarkMessiaH86 * natrius: thanks for your suggestion I will use it for sure!
22:05:06@twodots:matrix.org@twodots:matrix.org joined the room.
23 May 2020
19:20:48@twodots:matrix.org@twodots:matrix.org left the room.
25 May 2020
04:50:16@tony_danzo:matrix.orgtony_danzo joined the room.

There are no newer messages yet.


Back to Room List