[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

OFF topic: Bugg i MSVC 5 & 6 ??



Hejsan !

Går en programmeringskurs på vardagarna där vi använder Microsoft Visual C++ 5.0

Verkar som att vi hittade en bugg i kompilatorn. TÄnkte att det kanske kunde
vara bra att upplysa om den för många jobbar väl med att skriva program till
det "systemet".

Följande program krashar vid körning.
----------------
#include <stdio.h>

void main()
{
  int i;
  float f;
  
  while(1)
    {
      printf("Mata in ett flyttal > ");
      scanf("%f",&f);
      i=f;
      printf("Heltalet blir : %d\n\n",i);
    }
}
------------------

Om man byter ut i=f; till f=i; kompilerar om det och återställer till i=f; så
verkar det köra.

Fler som har stött på en sådan sak förutom vi 25 stycken på en kurs.

Sannolikheten att man omvandlar en float till en int är väl inte så stor, men
ändock.

Det fungerar bra om man kompilerar det med GCC..
 --

/Jocke

ICQ uin: 3939304

----------------------------------------------------------------

***     Linux..... The choice of a thinking generation     *****

----------------------------------------------------------------



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *