Thread: Testing 123

  1. #1
    Registered User
    Join Date
    Apr 2017
    Posts
    12

    Testing 123

    Greetings.

    I have been having problems posting to these boards.

    This is just a test to see if I have managed to fix the problem.

    Code:
    #include <stdio.h>
    
    int main(void)
    {
        printf("Type _Bool has a size of %zd bytes.\n", sizeof(_Bool));
        printf("Type char has a size of %zd bytes.\n", sizeof(char));
        printf("Type short has a size of %zd bytes.\n", sizeof(short));
        printf("Type int has a size of %zd bytes.\n", sizeof(int));
        printf("Type long has a size of %zd bytes.\n", sizeof(long));
        printf("Type long long has a size of %zd bytes.\n", sizeof(long long));
        printf("Type float has a size of %zd bytes.\n", sizeof(float));
        printf("Type double has a size of %zd bytes.\n", sizeof(double));
        printf("Type long double has a size of %zd bytes.\n", sizeof(long double));
        
        return 0;
    }

  2. #2
    Registered User
    Join Date
    Apr 2017
    Posts
    12
    Quote Originally Posted by fguy View Post
    Greetings.

    I have been having problems posting to these boards.

    This is just a test to see if I have managed to fix the problem.

    Code:
    #include <stdio.h>
    
    int main(void)
    {
        printf("Type _Bool has a size of %zd bytes.\n", sizeof(_Bool));
        printf("Type char has a size of %zd bytes.\n", sizeof(char));
        printf("Type short has a size of %zd bytes.\n", sizeof(short));
        printf("Type int has a size of %zd bytes.\n", sizeof(int));
        printf("Type long has a size of %zd bytes.\n", sizeof(long));
        printf("Type long long has a size of %zd bytes.\n", sizeof(long long));
        printf("Type float has a size of %zd bytes.\n", sizeof(float));
        printf("Type double has a size of %zd bytes.\n", sizeof(double));
        printf("Type long double has a size of %zd bytes.\n", sizeof(long double));
        
        return 0;
    }
    well that worked all right

  3. #3
    Registered User
    Join Date
    Apr 2017
    Posts
    12
    I am using Debian Linux. The first two posts were done using Firefox.This post is done using Chromium
    Code:
    #include int main(void){	printf("Type _Bool has a size of %zd bytes.\n", sizeof(_Bool));	printf("Type char has a size of %zd bytes.\n", sizeof(char));	printf("Type short has a size of %zd bytes.\n", sizeof(short));	printf("Type int has a size of %zd bytes.\n", sizeof(int));	printf("Type long has a size of %zd bytes.\n", sizeof(long));	printf("Type long long has a size of %zd bytes.\n", sizeof(long long));	printf("Type float has a size of %zd bytes.\n", sizeof(float));	printf("Type double has a size of %zd bytes.\n", sizeof(double));	printf("Type long double has a size of %zd bytes.\n", sizeof(long double));		return 0;}

  4. #4
    Registered User
    Join Date
    Apr 2017
    Posts
    12
    Well that post didn't go well . It seems the problem is just with Google Chromium. SO I will use Firefox when posting to this site. No problem.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    25,645
    Testing with Chromium too, on Ubuntu:
    Code:
    #include <stdio.h>
    
    int main(void) {
        printf("Hello world!\n");
        return 0;
    }
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    25,645
    fguy: I presume you copied and pasted the code from a text editor, and if so, which editor did you use? Did you use spaces or tabs for indenting?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Registered User
    Join Date
    Apr 2017
    Posts
    12
    I don't think the text editor I use is relevant, but I am using Pluma as my code editor, and using tabs for indentingThe problem is that all of my carriage returns are being ignored, so everything just runs together.This also happens with text that I type directly into the message window.For example, I have typed this post directly, using Chromium, with each sentence being a separate paragraph on its own line.I am expecting that all of these sentences will run together in one paragraph.

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    35,628
    The text editor is relevant, because some IDE's like to copy code complete with all the colour and font tags (and other associated 'smart' garbage) they use to make the code look pretty on screen.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  9. #9
    Registered User
    Join Date
    Apr 2017
    Posts
    12
    OK, point taken. But let's focus on the problem as described above, which occurs when I type directly into the message window, without using a text editor at all.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 64 bit testing
    By DrSnuggles in forum C++ Programming
    Replies: 7
    Last Post: 11-20-2007, 03:20 AM
  2. Testing Testing 123.. Oh yeah and...
    By minime6696 in forum Windows Programming
    Replies: 0
    Last Post: 08-13-2001, 09:07 AM

Tags for this Thread