Like in title, can I somehow get size of dynamic allocated array (I can't keep it separately), or somehow loop through this array without using it's size?
int *ar=new int[x]; //x-size of array, I don't know it in the beggining,
P.S. If I wanted to use std::vector, I wouldn't ask about it, so don't tell me to use it :)
char[]are terminated with'\0'. doing this though will take that value away from being used in the array except as an sequence terminator. Also if you are creating the array withxthen you already have the size stored somewhere becausexexist.