Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Include Looping? Pin
Ranjan Banerji23-May-03 5:13
Ranjan Banerji23-May-03 5:13 
AnswerRe: Include Looping? Pin
Rage23-May-03 4:32
professionalRage23-May-03 4:32 
GeneralRe: Include Looping? Pin
Ricky_TheBard23-May-03 4:46
Ricky_TheBard23-May-03 4:46 
AnswerRe: Include Looping? Pin
Alexandru Savescu23-May-03 5:59
Alexandru Savescu23-May-03 5:59 
GeneralResample IPicture Pin
Zizilamoroso23-May-03 4:00
Zizilamoroso23-May-03 4:00 
GeneralCFrameWnd client rect Pin
Chris Losinger23-May-03 3:53
professionalChris Losinger23-May-03 3:53 
GeneralRe: CFrameWnd client rect Pin
73Zeppelin23-May-03 4:20
73Zeppelin23-May-03 4:20 
GeneralSimple debugging question Pin
73Zeppelin23-May-03 3:02
73Zeppelin23-May-03 3:02 
GeneralRe: Simple debugging question Pin
Rage23-May-03 3:10
professionalRage23-May-03 3:10 
GeneralRe: Simple debugging question Pin
73Zeppelin23-May-03 3:30
73Zeppelin23-May-03 3:30 
GeneralRe: Simple debugging question Pin
73Zeppelin23-May-03 3:55
73Zeppelin23-May-03 3:55 
GeneralRe: Simple debugging question Pin
Rage23-May-03 4:31
professionalRage23-May-03 4:31 
GeneralRe: Simple debugging question Pin
jbarton23-May-03 3:39
jbarton23-May-03 3:39 
GeneralRe: Simple debugging question Pin
73Zeppelin23-May-03 3:57
73Zeppelin23-May-03 3:57 
GeneralTransparent control Pin
MemLeak23-May-03 2:46
MemLeak23-May-03 2:46 
GeneralRe: Transparent control Pin
Rage23-May-03 3:00
professionalRage23-May-03 3:00 
GeneralRe: Transparent control Pin
MemLeak23-May-03 3:11
MemLeak23-May-03 3:11 
GeneralRe: Transparent control Pin
basementman23-May-03 4:02
basementman23-May-03 4:02 
GeneralRe: Transparent control Pin
MemLeak23-May-03 4:53
MemLeak23-May-03 4:53 
GeneralAny link to a Free ebook about Drivers Pin
Fad B23-May-03 2:40
Fad B23-May-03 2:40 
GeneralHide passwords... Pin
rohit.dhamija23-May-03 2:11
rohit.dhamija23-May-03 2:11 
GeneralRe: Hide passwords... Pin
G. Steudtel23-May-03 3:12
G. Steudtel23-May-03 3:12 
GeneralRe: Hide passwords... Pin
jhwurmbach23-May-03 3:34
jhwurmbach23-May-03 3:34 
Generalerrors! Pin
flora_k23-May-03 0:59
flora_k23-May-03 0:59 
Hi,
i have plenty of errors in my code. Help Plz


void trl_calculation(int amount, unsigned char*pData, unsigned char sl)
{

unsigned char NrTrlValues;
unsigned char location;
unsigned char perc;
unsigned char time;
unsigned char *realTrlValues = NULL;;

pTrlValues = (unsigned char*) malloc(amount*sizeof(unsigned char)); //error C2440, error C2106:

for (int i=1; i < amount; i++)
{
pTrlValues[i] = (unsigned char) pData[location]; //error C2109:
if

((pData[location] - sl < 0) && (pData[location + 1] - sl ) > 0)||
((pData[location] - sl > 0) && (pData[location +1 ] - sl < 0)) //error C2143

perc = (sl - pData[location])/(pData[location + 1]) - pData[location];
time = location * 0.00000001923 + (((location * 0.00000001923) + 1) - (location * 0.00000001923))* perc;
//warning C4244

if
pData[location] - sl =0;//error C2061
pTrlValues [i] = location * 0.00000001923;//error C2109, warning 4244,error C2106:

realTrlValues[i] = pTrlValues[i+1] - pTrlValues[i];
//error C2106,arning4244

}
}

void histogram (long amount,unsigned char pTrlValues,unsigned char NrTrlValues)

{
int i_index;
const double Duration = amount/4096;
double histogram_ram[4096];
pTrlValues = (unsigned char*) malloc(amount*sizeof(unsigned char));//error C2440


for (int i=1; i <= amount; i++)
{
i_index = static_cast< unsigned int >(ceil(pTrlValues[i]/Duration)) + 1;//error C2109
histogram_ram[i_index]=histogram_ram[i_index]+1;

}
}


error C2440: '=' : cannot convert from 'unsigned char *' to 'unsigned char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
error C2109: subscript requires array or pointer type
error C2106: '=' : left operand must be l-value
error C2143: syntax error : missing ';' before '||'
warning C4244: '=' : conversion from 'double' to 'unsigned char', possible loss of data
error C2061: syntax error : identifier 'pData'
error C2109: subscript requires array or pointer type
warning C4244: '=' : conversion from 'double' to 'unsigned char', possible loss of data
error C2106: '=' : left operand must be l-value
error C2109: subscript requires array or pointer type
(625) : error C2109: subscript requires array or pointer type
warning C4244: '=' : conversion from 'int' to 'unsigned char', possible loss of data
error C2440: '=' : cannot convert from 'unsigned char *' to 'unsigned char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
error C2109: subscript requires array or pointer type


F.K
GeneralRe: errors! Pin
jhwurmbach23-May-03 1:05
jhwurmbach23-May-03 1:05 

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.