switch(current_chunk_id%4)
{
case 0:
PChunk chunk = new Chunk(current_chunk_id++, gCurrentTime, 0, 0.15);
break;
case 1:
PChunk chunk = new Chunk(current_chunk_id++, gCurrentTime, 1, 0.075);
break;
case 2:
PChunk chunk = new Chunk(current_chunk_id++, gCurrentTime, 2, 0.0375);
break;
case 3:
PChunk chunk = new Chunk(current_chunk_id++, gCurrentTime, 3, 0.01875);
break;
default:
fatal("something wrong with new chunk generation\n");
}
the error information is:
Description Resource Path Location Type
crosses initialization of ‘Chunk* chunk’ videostream.cpp p2ptv line 105 C/C++ Problem
Description Resource Path Location Type
‘chunk’ was not declared in this scope videostream.cpp p2ptv line 120 C/C++ Problem