| 
 Ученик-кочегар
 
 Группа: Участник
 Сообщений: 2
 
 
 
  
 | 
 | CODE |  | int main(int argc, char* argv[])
 {
 int data;
 unsigned short TransBytes;
 MSerial* com = new MSerial;
 cout << "Enter data number to write (from 0 to 31): ";
 cin >> data;
 if(com->Open("COM1", 1200, 5, 'N', 1))
 {
 cout << "Transmitting..." << endl;
 TransBytes = com -> Write((BYTE*)&data, 1);
 cout << endl << TransBytes << endl;
 }
 else {cout << "Port not opened";}
 
 com->Close();
 delete com;
 getch();
 return 0;
 }
 | 
 
 На delete выскакивает exception EAccessViolation. Какие проблемы в данном случае у деструктора. Из причин, приводимых в Helpе ни одна, на мой взгляд, ко мне не имеет отношения
 |