J
Jonathan.Bailleul
Am I ignorant of bug releases and fixes, a bad man-reader, or is it a
bug???
In advance, thanks for your help.
#include <iostream>
#include <string>
#include <math.h>
using namespace std;
int
main(void)
{
int i, size = 5;
int* tab;
assert(tab = (int*) calloc(size, sizeof(int)));
for (i = 0; i < size; i++) tab = i + 1;
for (i = 0, cout << endl; i < size; i++) cout << tab << " ";
size = 10;
assert(tab = (int*) realloc(tab, size));
for (i = 0, cout << endl; i < size; i++) cout << tab << " ";
return EXIT_SUCCESS;
}
//1 2 3 4 5
//1 2 3 4 16 0 139048 0 0 0
// /users/these/bailleul/These/OpenSource/Tests>g++ --version
//g++ (GCC) 3.2.2
bug???
In advance, thanks for your help.
#include <iostream>
#include <string>
#include <math.h>
using namespace std;
int
main(void)
{
int i, size = 5;
int* tab;
assert(tab = (int*) calloc(size, sizeof(int)));
for (i = 0; i < size; i++) tab = i + 1;
for (i = 0, cout << endl; i < size; i++) cout << tab << " ";
size = 10;
assert(tab = (int*) realloc(tab, size));
for (i = 0, cout << endl; i < size; i++) cout << tab << " ";
return EXIT_SUCCESS;
}
//1 2 3 4 5
//1 2 3 4 16 0 139048 0 0 0
// /users/these/bailleul/These/OpenSource/Tests>g++ --version
//g++ (GCC) 3.2.2