Skip to content

ATL / WTL / STL

Discussions on ATL, WTL and STL programming

This category can be followed from the open social web via the handle atl-wtl-stl@forum.codeproject.com

3.1k Topics 9.9k Posts
  • 0 Votes
    4 Posts
    7 Views
    T
    ok
  • how to initialize a value to pointer ?

    tutorial question
    6
    0 Votes
    6 Posts
    16 Views
    T
    thank you. And here is the correct code. #include int main() { int i, num[10]; int *p; p = &num[0]; for(i=0; i<10; i++) { \*(p+i) = i; } for(i=0; i<10; i++) { printf("\\n%d", \*(p+i)); } return 0; }
  • Problem with recursion.

    data-structures help question
    6
    0 Votes
    6 Posts
    14 Views
    R
    I started with a book by Scott Meyers called "Beginning C" or something like that. I can't seem to find it now so it may be out of print.
  • To take input for n number of arrays and print it.

    data-structures
    10
    0 Votes
    10 Posts
    24 Views
    T
    in the code below i have tried using recursion for printing output, but it's not working can you tell me what's wrong. #include int final_array(int arr[], int size, int k, int i); void array(int arr[], int i, int size); int main() { int num, size[100]; int i, j, k=0; int arr[100][100]; printf("Enter the number of arrays: \\t"); scanf("%d", &num); num = num < 100 ? num: 100; //feeding elements. for (i = 0; i
  • How to get cpu speed and ram manufaturer C Languae?

    performance tutorial question
    2
    0 Votes
    2 Posts
    5 Views
    A
    Do not try to do that, natively. Instead, consider using the platform specific APIs, such as the Linux APIs for C or the Win32 API on Windows. The benefit is that you will be able to get the information, such as the information about hardware (I am not sure, whether you will be able to dig that much information or not). Start from somewhere like this, [How to get current CPU and RAM usage in C++? - Stack Overflow](https://stackoverflow.com/questions/479722/how-to-get-current-cpu-and-ram-usage-in-c) [sysinfo(2) - Linux manual page](http://man7.org/linux/man-pages/man2/sysinfo.2.html) You would then need to go on other platform APIs such as the Win32, and find out what is offered there. Such as, [GetSystemInfo function (Windows)](https://msdn.microsoft.com/en-us/library/ms724381(VS.85).aspx) will provide the system info for CPU. One thing is for sure: What works on Linux with C, is not going to work on Windows and vice versa. Also, none of this guarantees to provide CPU make, or RAM manufacturer name. In most cases, you will have to pull down a complete stream of data, and then parse it to extract the interested portion; such as in this post, [How to check processor and cpu details on Linux | Linux.com | The source for Linux information](https://www.linux.com/blog/how-check-processor-and-cpu-details-linux) $ cat /proc/cpuinfo | grep vendor | uniq vendor_id : GenuineIntel $ cat /proc/cpuinfo | grep 'model name' | uniq model name : Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz $ lscpu Architecture: x86_64 Which shows, that you will have to extract and then parse the data to show the interested part; otherwise, that doesn't quite work that way. Good luck Googling. :-) The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
  • How do I keyboard input in OpenGL

    graphics game-dev help question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • How to Disable open drop down

    tutorial question
    5
    0 Votes
    5 Posts
    13 Views
    Y
    The problem is maintaining consistency, I'm using an IFileDialog to open files on some computers, it all works as expected in win10, but on others win7 ultimate, the Open button has an arrow with a dropdown menu that adds a second option, "show previous versions".
  • 0 Votes
    14 Posts
    30 Views
    M
    This article explains it. Basically you use LoadLibrary with the DLL's path given to it. The rest is mapping the functions you will need to call. - Michael Haephrati מיכאל האפרתי
  • GetUsbDrive letter error

    help c++ tutorial
    8
    0 Votes
    8 Posts
    19 Views
    3
    Nice - 3-way movers & packers
  • 0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    4 Posts
    11 Views
    L
    Sorry, no idea, I have not used VBScript in this way.
  • 0 Votes
    9 Posts
    20 Views
    T
    lolici wrote: Can I edit data in a list view? Off course you can, advantage of using List View over Listbox is that you can create columns and ability of in place editing. Here is one such article ListCtrl Operations[^]
  • 0 Votes
    10 Posts
    22 Views
    L
    Hi, arnold_w wrote: Since this a debug tool If this is a debug tool I recommend that you check out the Debug Interface Access SDK[^] which will allow you to get all kinds of useful information and statistics about your executable. You can dump each function/class size and type along with the variable name. Dia2dump Sample[^] TYPEINFODUMP[^] Best Wishes, -David Delaune
  • VS 2017 thinks I am building a MFC application

    help c++ visual-studio csharp question
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Text editor in vc++

    c++
    8
    0 Votes
    8 Posts
    21 Views
    L
    I'll check it!Thank you very mush for your help!! :)
  • How to move window with no border using picture control

    tutorial
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • code

    3
    0 Votes
    3 Posts
    5 Views
    P
    We do not do your HomeWork. HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them. Any failure of you will help your teacher spot your weaknesses and set remedial actions. So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help. As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better. When you just ask for the solution, it is like trying to learn to drive a car by having someone else training. Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem. Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein
  • STL std::string help needed

    c++ help question
    22
    0 Votes
    22 Posts
    98 Views
    L
    Thank you sir for your kind help and time, I now understand. However I converted the some of the functions in that library to accept std::wstring which I made it easy that way
  • Multiple Inheritance question

    oop question
    6
    0 Votes
    6 Posts
    12 Views
    S
    Thanks
  • Reference parameter question of friend function

    question
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied