Some concepts are used which are not even taught

<pair,pair> thing and type conversion from string to char
all these was not even taught in previous lectures
from where all these came ???

@anujsharmabadboy hey <pair,pair> will come in STL ,when you have to use two elements you use pair,and all the above comes under basics ,so you can raise doubt which you dont understand.

@rishabhmahajan546
i have studied the basics but i am not aware of all this.
type casting toh aati h but string to char nhi batayi sidha use aaya h yaha pe
pair<string,string> strpair[100] -> kya ha yeh sab
str(i).first yeh kya h
pair <string
s1.second
str.length
kya h yeh sab

koi aisa lecture h jaha yeh sab explain kraa ho

@anujsharmabadboy bhai pair is just like pair of two elements ,here pair<string,string> represents two elements whose type are string and string for other also , pair<string,string> strpair[100] -isme hm strpair naam ka array bna rhe hai 100 size ka jiska har ek element ek pair hai mtlb us array me har index pr ek pair hoga,pair ke element aise aceess hote hai:
pair<string ,string> p,sippose ye pair hai ,top iska first element aceess krna hai to p.first ,similiarky for second p.second ,str(i).first -this represent us array ke i index pr jo pair hai uska first element,s1.second->this for second element of pair ,str.length-this represents length or size of that array.Hope you get it.

@rishabhmahajan546
ans+=((st[i]-‘0’)*p)
yeh kese hua
(char -char)int will give the integer
???
((char
)str.c_str() yeh bhi samaj nhi aaya,

@anujsharmabadboy bhai first read about pairs from here:


aur pair<string dodo baar kyu send kiya ???-because pair me do elements hai so string do bar likha hai
(st[i]-‘0’)-This is done as hm character ko int me change krne ke lie 0 ki ascii me se minus krte hai isse woh int me change hua and further calculations hui,sirf int ki typecasting se kam nhi chlta.
The basic_string::c_str() is a builtin function in C++ which returns a pointer to an array that contains a null-terminated sequence of characters representing the current value of the basic_string object. This array includes the same sequence of characters that make up the value of the basic_string object plus an additional terminating null-character at the end.
eg:
// C++ code for illustration of

// basic_string::c_str function

#include <bits/stdc++.h>

#include <string>

using namespace std;

int main()

{

// declare a example string

string s1 = "GeeksForGeeks" ;

// check if the size of the string is same as the

// size of character pointer given by c_str

if (s1.size() == strlen (s1.c_str())) {

cout << "s1.size is equal to strlen(s1.c_str()) " << endl;

}

else {

cout << "s1.size is not equal to strlen(s1.c_str())" << endl;

}

// print the string

printf ( "%s \n" , s1.c_str());

}

Output:

s1.size is equal to strlen(s1.c_str()) GeeksForGeeks

@rishabhmahajan546
code submit nhi ho rha
compilation error aa rha h
error: ‘converttoint’ was not declared in this scope

@rishabhmahajan546 please bhai btaa do

@anujsharmabadboy let me check bro

@anujsharmabadboy bhai converttoint function ko numericcompare se upar define kro ,programme upar se compile hona start hota hai, numericcompare function ko converttoint milega hi nhi islie use isse upar define kro.

bhai compilation error aa rha h
ek baar tum krke dekho
par kisi line m error nhi btaa rha

@anujsharmabadboy bhai question link bhej do,I will submit it.

@rishabhmahajan546

aap code thik krdo na
aap run kraa ke dekho

@anujsharmabadboy bhai logic dekhna pdega ,tu link bhej de question ka mein thek krke dedunga tujhe ,basic concepts me dikkt hai bhai ,comparator function thek nhi hai.Ek bar qstn link bhejo mein dekhta hoon.

https://hack.codingblocks.com/app/practice/6/1042/problem

@rishabhmahajan546

bhai voh jo error tha voh mene sahi kr diya
ab dusra error aa rha h kuch aise krke :terminate called after throwing an instance
dekh lo bhai ek baaar

@anujsharmabadboy hn bhai let me check.

@anujsharmabadboy bhai apke extractstring function me dikkt hai,ap sir ki video dobara dekho and revise and modify this function baki code to sahi hai.

@rishabhmahajan546

bhai ho gya submit
saare case pass

@rishabhmahajan546

bhai maximum circular sum wale m bhi madad krdo
voh TA ab offline ho gya do din se single tick ka double tick nhi hua ab tak
apko mention kra tha aap aaye hi nhi