C++ Code

Posts 1–7 of 7 · Page 1 of 1
C++ Code
Since you need to write C++ in order to make a console and hack Vin... I feel like this is in the right section! In other words, C++ Code gives Hacks so a discussion on C++ Code belongs in Vindictus Hacks xD

/justify this thread in right section

Anyways, I'm not good at C++, as the main contributors on this forum are. If you don't want to share information.. That's fine I understand.

My request is, does anyone know how I can log what my console prints with cprintf()? I need to log all these const coming out of my console.

Or if I can skip the cprintf() part altogether and put these text-based const in a Notepad file altogether? Any information is greatly appreciated!! Thanks!!
Lol just to let you know it doesn't have to be C++ xD.
Quote Originally Posted by The_Ku View Post
Lol just to let you know it doesn't have to be C++ xD.
Oh well I don't know any other methods xD

And i know the mainstream method people in the Vindictus Hacks section use is definitely C++

Anyways, can anyone help? I've been looking through the nets but i can't figure it out. I know it's actually a very simple procedure to the contributors here, so I was hoping I could get help from them ><

Edit:

And also been lurking around in the Programming/C++ Section of MPGH... but I haven't found anything there... and believe me I use the Search function! I'm really really tired right now, I was hoping someone could give me a hand T_T
cprintf? wat... I don't even. Archaic C functions...

If you still want to use the C standard library, don't import <conio.h>. Import <cstdio> and use printf() for standard output and fprintf() for file output.

You're already importing <iostream> and <fstream>, so you can use std::cout for standard output and std::fstream for file output.
Quote Originally Posted by Fovea View Post
cprintf? wat... I don't even. Archaic C functions...

If you still want to use the C standard library, don't import <conio.h>. Import <cstdio> and use printf() for standard output and fprintf() for file output.

You're already importing <iostream> and <fstream>, so you can use std::cout for standard output and std::fstream for file output.
fstream is what i was hearing about.. Thanks so much!

Though.. is there a place I can learn more about this function? (I know it might be basic material, but I am unlearned xD) So far I've been figuring out how things work through trial and error, and it's VERY time consuming (as many of those who teach themselves might know). But anyways, Thanks so much for helping out~!!


EDIT:

I think I got this to work, but I'm getting a ton of LNK2019 errors when i try to compile.. any help? I've tried /FORCE and /WX: NO for properties but no cigar =/
Quote Originally Posted by kekitawong View Post
fstream is what i was hearing about.. Thanks so much!

Though.. is there a place I can learn more about this function? (I know it might be basic material, but I am unlearned xD) So far I've been figuring out how things work through trial and error, and it's VERY time consuming (as many of those who teach themselves might know). But anyways, Thanks so much for helping out~!!


EDIT:

I think I got this to work, but I'm getting a ton of LNK2019 errors when i try to compile.. any help? I've tried /FORCE and /WX: NO for properties but no cigar =/
The easiest way is using fprintf for files and cprintf for the console. You could also use the WriteConsole function, not sure if iostream works there, but it should.

Edit: Can you quote the errors?
Quote Originally Posted by Nico View Post
The easiest way is using fprintf for files and cprintf for the console. You could also use the WriteConsole function, not sure if iostream works there, but it should.

Edit: Can you quote the errors?
Ok. It only happens when I put in these lines:

Code:
fstream file;
Code:
file.open("file.txt", ios::in | ios::out);
Code:
file<<(something here);
file<<(something here);
and finally:

Code:
file.close();
They are in that order in the whole code, not all together but appear in that order.

The errors are:

Code:
Error	10	error LNK2019: unresolved external symbol "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@iOS_base@STD@@CaxPAV12@@Z) referenced in function "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@STD@@UAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	11	error LNK2019: unresolved external symbol "public: __thiscall std::_Mutex::~_Mutex(void)" (??1_Mutex@STD@@QAE@XZ) referenced in function "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@STD@@@STD@@UAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	12	error LNK2019: unresolved external symbol "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@STD@@QAEXXZ) referenced in function "public: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (?_Lock@?$basic_streambuf@DU?$char_traits@D@STD@@@STD@@UaexXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	13	error LNK2019: unresolved external symbol "public: void __thiscall std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex@STD@@QAEXXZ) referenced in function "public: virtual void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_streambuf@DU?$char_traits@D@STD@@@STD@@UaexXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	14	error LNK2001: unresolved external symbol "__int64 const std::_BADOFF" (?_BADOFF@STD@@3_JB)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	15	error LNK2019: unresolved external symbol "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@STD@@QAE@XZ) referenced in function "public: __thiscall std::_Iterator_base12::~_Iterator_base12(void)" (??1_Iterator_base12@STD@@QAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	16	error LNK2019: unresolved external symbol "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@STD@@QAE@H@Z) referenced in function "public: __thiscall std::_Iterator_base12::~_Iterator_base12(void)" (??1_Iterator_base12@STD@@QAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	17	error LNK2019: unresolved external symbol "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@STD@@YAXPB_W0I@Z) referenced in function "public: void __thiscall std::_Iterator_base12::_Orphan_me(void)" (?_Orphan_me@_Iterator_base12@STD@@QAEXXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	18	error LNK2019: unresolved external symbol "class std::error_category const & __cdecl std::iostream_category(void)" (?iostream_category@STD@@YAABVerror_category@1@XZ) referenced in function "class std::error_code __cdecl std::make_error_code(enum std::io_errc::io_errc)" (?make_error_code@STD@@YA?AVerror_code@1@W4io_errc@31@@Z)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	19	error LNK2019: unresolved external symbol "struct _iobuf * __cdecl std::_Fiopen(char const *,int,int)" (?_Fiopen@STD@@YapAU_iobuf@@PBDHH@Z) referenced in function "public: class std::basic_filebuf<char,struct std::char_traits<char> > * __thiscall std::basic_filebuf<char,struct std::char_traits<char> >::open(char const *,int,int)" (?open@?$basic_filebuf@DU?$char_traits@D@STD@@@STD@@QAEPAV12@PBDHH@Z)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	20	error LNK2019: unresolved external symbol "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@STD@@YAXPBD@Z) referenced in function "public: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Xlen(void)const " (?_Xlen@?$basic_string@DU?$char_traits@D@STD@@V?$allocator@D@2@@STD@@QBEXXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	21	error LNK2019: unresolved external symbol "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@STD@@YAXPBD@Z) referenced in function "public: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Xran(void)const " (?_Xran@?$basic_string@DU?$char_traits@D@STD@@V?$allocator@D@2@@STD@@QBEXXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	22	error LNK2019: unresolved external symbol "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@iOS_base@STD@@SaxPAV12@@Z) referenced in function "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(enum std::_Uninitialized,bool)" (??0?$basic_ostream@DU?$char_traits@D@STD@@@STD@@QAE@W4_Uninitialized@1@_N@Z)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	23	error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YapAXIABU_DebugHeapTag_t@STD@@PADH@Z) referenced in function "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@STD@@@STD@@IAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	24	error LNK2019: unresolved external symbol "struct std::_DebugHeapTag_t const & __cdecl std::_DebugHeapTag_func(void)" (?_DebugHeapTag_func@STD@@YAABU_DebugHeapTag_t@1@XZ) referenced in function "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@STD@@@STD@@IAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	25	error LNK2019: unresolved external symbol "public: __thiscall std::_Mutex::_Mutex(void)" (??0_Mutex@STD@@QAE@XZ) referenced in function "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@STD@@@STD@@IAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	26	error LNK2019: unresolved external symbol "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@STD@@capaV_Locimp@12@XZ) referenced in function "public: __thiscall std::locale::locale(void)" (??0locale@STD@@QAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	27	error LNK2019: unresolved external symbol "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (?_Init@locale@STD@@capaV_Locimp@12@XZ) referenced in function "public: __thiscall std::locale::locale(void)" (??0locale@STD@@QAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	28	error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: char const & __thiscall std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >::operator*(void)const " (??D?$_String_const_iterator@DU?$char_traits@D@STD@@V?$allocator@D@2@@STD@@QBEABDXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	29	error LNK2001: unresolved external symbol "public: static class std::locale::id std::ctype<char>::id" (?id@?$ctype@D@STD@@2V0locale@2@A)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	30	error LNK2001: unresolved external symbol "private: static int std::locale::id::_Id_cnt" (?_Id_cnt@id@locale@STD@@0HA)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	31	error LNK2019: unresolved external symbol "private: static void __cdecl std::locale::facet::_Facet_Register(class std::locale::facet *)" (?_Facet_Register@facet@locale@STD@@CaxPAV123@@Z) referenced in function "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@STD@@QAEXXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	32	error LNK2019: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@STD@@SaxPAV12@PBD@Z) referenced in function "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@STD@@QAE@PBD@Z)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	33	error LNK2019: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@STD@@SaxPAV12@@Z) referenced in function "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@STD@@QAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	34	error LNK2019: unresolved external symbol __Getctype referenced in function "public: struct _Ctypevec __thiscall std::_Locinfo::_Getctype(void)const " (?_Getctype@_Locinfo@STD@@QBE?AU_Ctypevec@@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	35	error LNK2019: unresolved external symbol __Tolower referenced in function "protected: virtual char __thiscall std::ctype<char>::do_tolower(char)const " (?do_tolower@?$ctype@D@STD@@MBEDD@Z)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	36	error LNK2019: unresolved external symbol __Toupper referenced in function "protected: virtual char __thiscall std::ctype<char>::do_toupper(char)const " (?do_toupper@?$ctype@D@STD@@MBEDD@Z)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	37	error LNK2019: unresolved external symbol __free_dbg referenced in function "private: void __thiscall std::_Yarn<char>::_Tidy(void)" (?_Tidy@?$_Yarn@D@STD@@aaeXXZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Error	38	error LNK2019: unresolved external symbol "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@STD@@YA_NXZ) referenced in function "public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::sentry::~sentry(void)" (??1sentry@?$basic_ostream@DU?$char_traits@D@STD@@@STD@@QAE@XZ)	C:\Users\Aaron\Desktop\MyMod\cl_dll\main.obj	client_hl2
Which are all LNK2019 errors. Thanks for trying to help me out x3
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.
Talk with us