Search:
Forum
General C++ Programming
I am just trying to develop a social net
I am just trying to develop a social networking kind of thing in c++.
Nov 13, 2015 at 7:44am UTC
Pravesh1999
(1)
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??
Nov 13, 2015 at 11:28am UTC
mutexe
(2372)
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.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs