i have in part of my program error "Use of unassigned local variable".

long gg = weight << 7;(error 15)

it means that 'weight' hasn't been given a value yet; try putting '=0' in the declaration.

Simple i am considering weight as integer type.Because you didn't mention it here.
So type :

int weight=new int();

It will call its constructor, and assign its default value which is 0

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.