Click here to Skip to main content
15,905,563 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: date comparison [modified] Pin
ggoutam75-Oct-10 20:54
ggoutam75-Oct-10 20:54 
GeneralRe: date comparison Pin
David Crow6-Oct-10 3:24
David Crow6-Oct-10 3:24 
GeneralRe: date comparison Pin
ggoutam711-Oct-10 23:11
ggoutam711-Oct-10 23:11 
QuestionCDateTimeCtrl Pin
ganesh_IT5-Oct-10 19:01
ganesh_IT5-Oct-10 19:01 
AnswerRe: CDateTimeCtrl Pin
_AnsHUMAN_ 5-Oct-10 19:35
_AnsHUMAN_ 5-Oct-10 19:35 
AnswerRe: CDateTimeCtrl Pin
Sameerkumar Namdeo5-Oct-10 19:44
Sameerkumar Namdeo5-Oct-10 19:44 
AnswerRe: CDateTimeCtrl Pin
cccfff7778-Oct-10 1:09
cccfff7778-Oct-10 1:09 
Questionproblems with using print data Pin
dusk855-Oct-10 16:03
dusk855-Oct-10 16:03 
hi,i'm currently doing a project using a software,Waspmote. I have some problems with my codings,it gave me 2 errors when i tried correcting it,

In function 'void loop()':
error: expected initializer before 'uint8_t'

In function 'void loop()':
error: a function-definition is not allowed here before '{' token


could anyone kindly help me take a look at the codings and suggest ways for me to improve on it.The code is as shown below:

int n=0;

void setup(){
// setup for Serial port over USB
USB.begin();
USB.println("USB port started...");
USB.close();

// Powering BT
BT.ON();

// Init
if(!BT.init()) USB.println("Init OK");
}
void loop()
{

// Searching for devices
if(!BT.scanNetwork()) USB.println("Scan OK");
else USB.println("Scan failed");

// Printing the devices that have been found
for(int l=0;l<BT.devices_found;l++)
{
n=0;
USB.print("---- DEVICE ");
USB.print(l,DEC);
USB.print(" ---- ");
USB.print("MAC: ");
for(int m=0;m<12;m++)
{
USB.print(BT.discovered_devices[l].mac_address[m],BYTE);
}
USB.print(" -- NAME: ");
while(BT.discovered_devices[l].name[n]!='\0')
{
USB.print(BT.discovered_devices[l].name[n],BYTE);
n++;
}
n=0;
USB.print(" -- CoD: ");
while(BT.discovered_devices[l].CoD[n]!='\0')
{
USB.print(BT.discovered_devices[l].CoD[n],BYTE);
n++;
}
USB.println("");

delay(2000);
}

// Creating a connection to a device
if(!BT.createConnection("0017E5F1CF74","02"))
{
USB.println("");
USB.print("--- CONNECTION -- MTU: ");
USB.print(BT.connection_mtu[0],BYTE);
USB.print(BT.connection_mtu[1],BYTE);
USB.println(BT.connection_mtu[2],BYTE);
}
else USB.println("Connection failed");


delay(1000);

void printData(char* data )
{
uint8_t uart=0;

printString(data,uart);
printByte('\r',uart);
printByte('\n',uart);

}
delay(2000);

return ;
}
AnswerRe: problems with using print data Pin
Peter_in_27805-Oct-10 16:25
professionalPeter_in_27805-Oct-10 16:25 
GeneralRe: problems with using print data Pin
dusk855-Oct-10 17:08
dusk855-Oct-10 17:08 
GeneralRe: problems with using print data Pin
Peter_in_27805-Oct-10 17:23
professionalPeter_in_27805-Oct-10 17:23 
GeneralRe: problems with using print data Pin
dusk855-Oct-10 17:41
dusk855-Oct-10 17:41 
GeneralRe: problems with using print data Pin
Peter_in_27805-Oct-10 18:00
professionalPeter_in_27805-Oct-10 18:00 
GeneralRe: problems with using print data Pin
dusk855-Oct-10 20:06
dusk855-Oct-10 20:06 
GeneralRe: problems with using print data Pin
Peter_in_27805-Oct-10 20:17
professionalPeter_in_27805-Oct-10 20:17 
AnswerRe: problems with using print data Pin
Luc Pattyn5-Oct-10 16:40
sitebuilderLuc Pattyn5-Oct-10 16:40 
QuestionVS2010 & SDK 7.1 Pin
Fareed Rizkalla5-Oct-10 12:43
Fareed Rizkalla5-Oct-10 12:43 
QuestionMySQL 5.0 and Visual C++ 6....do they work together? Pin
ns5-Oct-10 7:48
ns5-Oct-10 7:48 
AnswerRe: MySQL 5.0 and Visual C++ 6....do they work together? Pin
_Flaviu17-Mar-13 21:09
_Flaviu17-Mar-13 21:09 
QuestionString Pin
Fareed Rizkalla5-Oct-10 6:16
Fareed Rizkalla5-Oct-10 6:16 
AnswerRe: String Pin
Richard MacCutchan5-Oct-10 6:49
mveRichard MacCutchan5-Oct-10 6:49 
GeneralRe: String Pin
Fareed Rizkalla5-Oct-10 8:20
Fareed Rizkalla5-Oct-10 8:20 
GeneralRe: String Pin
Moak5-Oct-10 8:36
Moak5-Oct-10 8:36 
GeneralRe: String Pin
Richard MacCutchan5-Oct-10 9:05
mveRichard MacCutchan5-Oct-10 9:05 
AnswerRe: String PinPopular
Moak5-Oct-10 6:59
Moak5-Oct-10 6:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.