asigning or printing as thoug by chance

2013-03-25
2013-04-02
  • Mattias Grosse

    Mattias Grosse - 2013-03-25

    Using

    < #include <stdio.h
    < #include <stdlib.h

    < int main()
    < {
    < int i=1234;
    < printf("i : %d\n"),i;
    <
    < system("PAUSE");
    < return 0;
    < }

    I will always get different outputs when running the compiled Programm.

    for example:

    i : -1729247887
    i : 348808681
    i : 1211410731

    Did I catch a virus? When starting to work with bloodshed there were no problems. Problems occured, after I used math.c for the first time in an other project.

    I deinstalled and reinstalled the bloodshed compiler.
    Using an other Programmcode and compiling as C++ it seems to work correctly.
    When starting to work with bloodshed I stored projekts in the dev-cpp Folder and made mistakes in naming.

     
    Last edit: Mattias Grosse 2013-03-25
  • Endre

    Endre - 2013-03-27

    Hi)))
    You didnt cacthed any virus.
    Try this one: printf("i : %d\n", i);
    it have to works)))

     
  • Mattias Grosse

    Mattias Grosse - 2013-04-02

    Thanks a lot - little change, big effekt!

     

Log in to post a comment.