Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


question about C

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
haha01haha01
Grandmaster Cheater Supreme
Reputation: 0

Joined: 15 Jun 2007
Posts: 1233
Location: http://www.SaviourFagFails.com/

PostPosted: Sat Jul 21, 2007 3:36 am    Post subject: question about C Reply with quote

im programming some stuff in C, using "microsoft visual studio 6.0 ->microsoft visual c++ 6.0

it work great but there is 1 prob.
i know that to make the clrscr() command i need to include <conio.h> and to make randomize() i need to include <stdlib.h> but even if i include these files, still i cant execute the program beacuse of "unresolved external symbol_randomize" or "unidentified command_clrscr"
some alredy got that error b4 and know how to solve it?
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sat Jul 21, 2007 3:57 am    Post subject: Reply with quote

To be honest, i've never ever seen randomize(). I know srand & rand exist so try them.

As for clrscr, try this code which the_undead sent me:
Code:
void ClearScreen()
{
  HANDLE hSTD = GetStdHandle(STD_OUTPUT_HANDLE);
  COORD coordinates = {0,0};
  CONSOLE_SCREEN_BUFFER_INFO buffer_info;
  GetConsoleScreenBufferInfo(hSTD, &buffer_info);
  FillConsoleOutputCharacter(hSTD, ' ', buffer_info.dwSize.X * buffer_info.dwSize.Y, coordinates, NULL);
  SetConsoleCursorPosition(hSTD, coordinates);
}
Back to top
View user's profile Send private message MSN Messenger
haha01haha01
Grandmaster Cheater Supreme
Reputation: 0

Joined: 15 Jun 2007
Posts: 1233
Location: http://www.SaviourFagFails.com/

PostPosted: Sat Jul 21, 2007 4:18 am    Post subject: Reply with quote

where should i paste that clearscreen thing? if i put it inside my code it isnt working (making many errors)

as for the rand thing it worked but it always give the same value (not randomized).
maybe something in my files are wrong?
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sat Jul 21, 2007 4:31 am    Post subject: Reply with quote

to use the rand try this:

Code:

int rndNumber;
srand();  // This starts the rand stream btw!!!
rndNumber = rand(time(0));


I think it returns the number Laughing.

Heres some documentation: http://www.cplusplus.com/reference/clibrary/cstdlib/rand.html

And the clear screen thing, just paste it under your includes and call it when you need to clear the screen:
Code:

ClearScreen();
Back to top
View user's profile Send private message MSN Messenger
haha01haha01
Grandmaster Cheater Supreme
Reputation: 0

Joined: 15 Jun 2007
Posts: 1233
Location: http://www.SaviourFagFails.com/

PostPosted: Sat Jul 21, 2007 4:40 am    Post subject: Reply with quote

nope nothing works.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Jul 21, 2007 7:34 am    Post subject: Reply with quote

get a new compiler. That's it. Go in the library of compilers post and pick one for C/C++
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites