Thread: conversion
View Single Post
  #2 (permalink)  
Old March 16th, 2004, 09:45 AM
Gert Gert is offline
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't know if I can help you with your original problem, but I see some potensial problems in you code:

 
Quote:
quote:#define SIZE 8
Quote:
void Converter(int binary[])
{
int num[SIZE];

for(count = SIZE - 1; count >= 0; cout--)
{
  if(binary[0] = '1'); // is negative
   sum[count] = 0; // this making everything to zero
} // end for
}
Where do you use the num array?
The for-loop will go for ever, since count is not decremented (spelling error most likely).
Where is sum decleared?

Gert
Reply With Quote