Jump to content
  • Advertisement

User134

Member
  • Content count

    13
  • Joined

  • Last visited

Community Reputation

-1 Poor

About User134

  • Rank
    Member

Personal Information

  • Interests
    Art
    Programming

Social

  • Github
    NoName1
  1. what do you mean by standard since 2011 ?
  2. For the same code : class B{ public: int age; int code; B(){ cout << "Age | " << &age << endl; cout << "Code | " << &code << endl; } }; int main() { B obj; cout << "Object | " << &obj << endl; return 0; } Output : Object | 0x6afef8 this object is just a pointer right ? how this pointer points to all the member classes ? how to get the offsets of the class member ?
  3. Suppose i have this code : class B{ public: int age; int code; B(){ cout << "Age | " << &age << endl; cout << "Code | " << &code << endl; } }; int main() { B obj; cout << "Object | " << &obj << endl; return 0; } Output : Age | 0x6afef8 Code | 0x6afefc Object | 0x6afef8 here why the object address is the same for the age address ?
  4. So if i have 2 boxes one for x and the second one for *ptrx Say that the box of x is in location 0x1000 and the ptrx is in the location 0x2000 int x = 15; int *ptrx; now if i made this ptr points to x how the boxes will be at the same location ???! for example how we will have a box of x in the location 0x1000 and the box of pts in the location 0x1000
  5. So if i have a class of 2 attributes class A{ int age = 15,code = 30; } new A(); now this code allocates 12 bytes in memory for the object which for example : say that the address of the object is 0x100 so the age will be at 0x104 and the code will be at 0x108 (4 bytes (int) ) is that right ? now when i do that A obj = new A(); obj is a pointer which points to the object and the age and the code is that right and i really wanted any videos about that to understand better because i stopped coding just to understand how things work
  6. so when i say x = y that means the value of y equals x not means the address of y = x right ? in java there's no pointers linke the * in c++ so how for example can i make the address of x equals the address of y and what about the objects
  7. Hi i am actually having some problems in understand what happens in the memory ... for example i have 2 int variables [ int x and y ] x = 15 and y = 30 in memory for example the address of x = 0x123456 and the address of y = 0x654321 now if i did this x = y isn't that means in memory the address of y will be the same for x or what ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Now here in java in creating objects ... say that i have a class called a and the attributes is name and age so when i create an object : a objectreference = new a(); now i have allocated the memory for the object of class a and a reference called objectrefernece reference to object of class a now how this objectreference reference to the object ? how that's done in memory also what happens in memory when i create an object and what happen to the attributes i wish if u can answer me
  8. User134

    Question about C++ , C# and Java

    You guys didn't actually get what i meant i see that people says that c++/cli is not the same for c++ like gcnew , ^ pointer etc ... And they says mfc or qt is better i have already used both of them mfc and qt but i didnt like both of them so i can continue on using clr ?
  9. Hi i really wanted to know if i am in the right section or not to ask this question how ever ... I have already learned the basics of C++ and C++/CLI i have learned C++ for building gui for desktop applications and now i am just learning the basics of java nothing more just to use Android studio to build android apps how ever now i am having some problems with the desktop applications for building gui ... which is the best and faster language C++ / C# or java ? I am currently using C++/CLi (Clr) in C++ but i see many peoples says that Qt is better i have already used Qt but i didn't like Qt and i like clr much more and i also see that many people says that for building gui C# is the best choice while the others says that C++ is faster than C# so what is the best way i have to choose ... Do i have to complete in learning C++/CLi and continue bulding gui apps in it or i have to learn C# or i have to use Qt answer me please
  10. User134

    C++ Getting unicode from an ini file

    Becouse i am using C++/CLR so gcnew is like new and ^ is like * and String is like string
  11. Hi, i wish if everyone is having a good day My question is about I am reading the selected text from the listview String ^ItemSelected = listView1->SelectedItems[0]->Text; But i wanted to write the result to an ini file but since the Writeprivateprofilesection needs an parameter of type LPCWSTR i cannot pass ItemSelected to it WritePrivateProfileSection(ItemSelected,L"Key = Value", L".//Text.txt");
  12. User134

    C++ Getting unicode from an ini file

    Okay guys the problem was that the ini file was UTF-8 and not unicode hhhhhhhh Anway i wanted to ask another question ... Since the Get and buffer are not char and TCHAR So when i use MessageBox::Show(Get); It will give me error so i have tried this : String ^GetResult = gcnew String(Get); MessageBox::Show(GetResult); This one works but i don't know how this line works String ^GetResult = gcnew String(Get); Can you please explain it ?
  13. Hi, this is my first post here and i hope to get an answer My question is i am reading the section names from an file Unfortunately these section name contains unicode chars so when i read them i just get ???? here's my code ... TCHAR buffer[4096]; int Lsize = sizeof(buffer),length; GetPrivateProfileSectionNames(buffer,Lsize,".//Test.txt"); TCHAR *Get = buffer; while (*Get){ length = strlen(Get); Get += length; Get++; }
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!