User Profile

Collapse

Profile Sidebar

Collapse
iamkajal
iamkajal
Last Activity: Jul 8 '21, 10:43 AM
Joined: Jun 23 '21
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • (1) String buffer of sprintf and snprintf functions
    Because sprintf may cause buffer overflow problems and is not recommended, I always prefer to use the snprintf function in the project, although it will be a little troublesome. Here is the main difference between sprintf and snprintf: snprintf ensures that the buffer does not overflow by providing the available size of the buffer and passing parameters. If it exceeds the buffer size, it...
    See more | Go to post

    Leave a comment:


  • iamkajal
    replied to deletion of user defined <list>
    in C
    you should try this

    / C++ code to demonstrate the working of erase()

    Code:
    #include<iostream>
    #include<list> // for list operations
    using namespace std;
      
    int main()
    {
        // initializing list of integers
        list<int> list1={10,15,20,25,30,35};
          
        // declaring list iterators
        list<int>::iterator it = list1.begin();
    ...
    See more | Go to post
    Last edited by Niheel; Jul 7 '21, 10:59 AM.

    Leave a comment:

No activity results to display
Show More
Working...