I am just trying to develop a social networking kind of thing in c++.

if(cnfrm=='Y' || cnfrm=='y')
{
d_lay();
checkid(G.id);
char x[20],cx[20];
srand(time(NULL));
for(int i=0;i<10;i++)
{
x[i]=random%(26)+65;
if(i==2)
x[i]=random%(26)+97;
if(i%2==0)
x[i]=random%(26)+97;
if(i==2)
x[i]='&';
if(i==6)
x[i]='!';
x[9]='\0';
x[0]=random%(26)+65;
}

This code just generates random character type of thing which i used for my authentication.So when i compile this in dev c++ it says random undeclared . How i gotta fix this??
You're not calling the random function. See example here:
http://www.cplusplus.com/reference/cstdlib/rand/

(if I think you're trying to do what I think you're trying to do)

Can you also put future code in code tags as well please?
Topic archived. No new replies allowed.