Hello
I want to use a combobox to select which COM port on the pc my interface uses.
at the moment i'm using this (which dose not work)
private: System::Void button6_Click(System::Object * sender, System::EventArgs * e)
{
char com[4];
for(int k=0;k<comboBox1->Text->Length;k++)
com[k]=comboBox1->Text->Chars[k];
SerialPort.Open(com, 19200);
}
i get the warning message: conversion from '__wchar_t' to 'char', possible loss of data.
in the combobox drop down bit is "COM1,COM2,COM3,COM4,COM5,COM6,COM7,COM8"
Is there a way to make this work in c++??