Search:

Type: Posts; User: guraknugen

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,061

    I'm a beginner myself, but is there really a bool...

    I'm a beginner myself, but is there really a bool type in C? I know there are libraries for it, but I don't see one included here.
  2. Replies
    21
    Views
    3,731

    Once again, thank you so much for doing all that...

    Once again, thank you so much for doing all that work!


    Got me… But now, when I looked a little at it, I realise that I probably should…

    Hehehe… I'm not that big and I wouldn't call myself a...
  3. Replies
    21
    Views
    3,731

    I did some tests with your code above, and guess...

    I did some tests with your code above, and guess what… I have a couple of (newbie) questions…

    It works, but I don't really understand the pointer-to-pointer thing in the widen function. In main,...
  4. Replies
    21
    Views
    3,731

    Wow, that was really a lot of great and useful...

    Wow, that was really a lot of great and useful information. Thanks a lot!

    I searched yesterday for information about error handling and it seems like some people don't like the use of errno.h...
  5. Replies
    21
    Views
    3,731

    Oh, another one. The questions never end, it...

    Oh, another one. The questions never end, it seems…

    In my working example, the following is not good, is it?

    for(int i=1; i<=2; i++)
    printf("%ls\n", ToWide(argv[i]));
    return...
  6. Replies
    21
    Views
    3,731

    Oh, sorry, one more question: if(n > 0) { ...

    Oh, sorry, one more question:

    if(n > 0) {
    c = mbstowcs(w, s, n + 1);
    if(c != s) {
    free(w);
    /* s or locale was modified unexpectedly. Set errno? */
    return NULL;...
  7. Replies
    21
    Views
    3,731

    My test program works fine now after following a...

    My test program works fine now after following a selected amount of advice above… Made a few changes and everything works. After replacing %s with %ls and replacing ”*MyString” with ”Mystring”, the...
  8. Replies
    21
    Views
    3,731

    Okay, thanks. Again very useful information. I...

    Okay, thanks. Again very useful information.

    I am currently experimenting with this to correct a small, simple program that I wrote. The program counts characters and looks for characters in...
  9. Replies
    21
    Views
    3,731

    I think I remember why I did that now… I think my...

    I think I remember why I did that now… I think my original idea was to send the whole argv to the function and let the function convert relevant parts of it to wide string, but then I abandoned that...
  10. Replies
    21
    Views
    3,731

    Yes, you're right. I didn't think of that. ...

    Yes, you're right. I didn't think of that.

    Thanks, seems to be some nice details in there that I can learn from. When I studied C in the 1980's, wide strings didn't exist, at least we never...
  11. Replies
    21
    Views
    3,731

    Yes, I know all that, but what I was trying to...

    Yes, I know all that, but what I was trying to say is that someone stated that printf and wprintf doesn't use the same letters, that is %s in wprintf does the same thing as %ls in printf. I don't...
  12. Replies
    21
    Views
    3,731

    [QUOTE=WoodSTokk;1230749]I have not checked the...

    For some reason this site is telling me that I need to lengthen this message with at least 4 characters, so here they are, and a few more… Well, I don't mind. If it asks for nonsense, I'll write...
  13. Replies
    21
    Views
    3,731

    Thanks for your reply. I'll give it another shot...

    Thanks for your reply. I'll give it another shot soon (quite busy this evening with other stuff).
    Since I get the original string from argv[1] in this case, I don't know the maximum length of the...
  14. Replies
    21
    Views
    3,731

    Thank you for replying, I appreciate it very...

    Thank you for replying, I appreciate it very much.

    Well, I already knew that I sent the wrong thing to the wprintf. My intention was that *MyString should contain, in your case, ”foo”, which it...
  15. Replies
    21
    Views
    3,731

    Segmentation fault

    I'm not really sure what happens here. The problem is that I get a segmentation fault at the last wprintf at line 66 in my code below.

    I'm obviously missing something that is probably obvious for...
  16. Replies
    2
    Views
    2,227

    When do I actually need unsigned int?

    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    unsigned int i=-100, j=-100;
    // int i=-100, j=-100; ← This also works, for some reason…
    for(int x=0; x<30; i+=8, x++) {...
  17. Replies
    14
    Views
    1,424

    Thanks! Works perfectly, even when I compile it...

    Thanks! Works perfectly, even when I compile it as GNU99. I'm not sure exactly what the difference is, but I'm sure some things are…
    I will learn a lot from this, I'm sure.
  18. Replies
    14
    Views
    1,424

    Thanks, that page gives me slightly more...

    Thanks, that page gives me slightly more information than gnome-character-map.



    Well, I'm not very interested in Windows, I left it behind in 2008 I think, but I enjoyed the link anyway…
  19. Replies
    14
    Views
    1,424

    That was actually one part of the whole thing...

    That was actually one part of the whole thing that I didn't realise…! Thanks!

    I'll reply to the other replies tomorrow, need some sleep now…
  20. Replies
    14
    Views
    1,424

    Funny. I have tried to find information about...

    Funny. I have tried to find information about this for ∞ (almost…) and now when I finally ask for it on a forum I find the answer by just ”googling” for a few minutes…

    I found this working...
  21. Replies
    14
    Views
    1,424

    UTF-8 characters

    I'm trying to understand how to write UTF-8 compatible C programs. I have seen that there are tons of text about it out there, maybe a little too much. It's hard to find exactly what I need to know...
  22. Replies
    4
    Views
    820

    That all make sense to me now. Thanks! And...

    That all make sense to me now. Thanks!

    And yes, 100 % Linux here.
  23. Replies
    4
    Views
    820

    When to print to stderr?

    Of course, when there is an error, that much I understand. But what about these cases?

    User doesn't know how to run the program, so he (or she) simply runs it without parameters to get...
  24. Replies
    9
    Views
    967

    Yes, you're right. I'll keep that in mind. Thanks.

    Yes, you're right. I'll keep that in mind. Thanks.
  25. Replies
    9
    Views
    967

    I don't know where that came from. Obviously I...

    I don't know where that came from. Obviously I wrote before thinking… I think I was thinking about another solution I had, not discussed in this thread…
Results 1 to 25 of 89
Page 1 of 4 1 2 3 4