// -------------------------- Example 1 -------------------------- #include #include #include using namespace std; int main() { string cars[] = {"Corvette","Tesla","Ferrari","Audi" }; for (int i = 0; i < size(cars);i++) { cout
Hey bro. Love these tutorials! 2 Questions about part 2 if you have the time. 1) Would this work if you used a regular Array instead of a pointer to the address of an Array? Why or why not? 2) Why don’t you have to dereference the pCars[i]? Without that, why isn’t it just printing the address of that portion of the Array?
the size function is contained within the set namespace of the standard namespace, code bro included using namespace std at the top of the file which is generally bad practice, what you should write it as is std::set::size()
// -------------------------- Example 1 --------------------------
#include
#include
#include
using namespace std;
int main()
{
string cars[] = {"Corvette","Tesla","Ferrari","Audi" };
for (int i = 0; i < size(cars);i++) {
cout
Bro, your videos are literally helping me with my c++ class. No programming jargon to confuse me. love it!
Thank you bro. Yor are a hero.
Hey bro. Love these tutorials! 2 Questions about part 2 if you have the time.
1) Would this work if you used a regular Array instead of a pointer to the address of an Array? Why or why not?
2) Why don’t you have to dereference the pCars[i]? Without that, why isn’t it just printing the address of that portion of the Array?
You r done RUclips algo
Great vid 👍👍
good video
Thanks bro ...plz continue making video on c++..these are very helpful
Best❤
nice
Bro u r my hero ☺️
like it
Bless
❤❤❤❤
Thanks again Bro
cool
thank you brooo!!!!!!🤩
Thank you
Sir size()exact size return krta hai to wo q nhi use kia
Hey bro, I’m finding it hard to understand the sorting of arrays
Hello in line 13, why didn't you just declare an array without any pointer?
I'm just curious thank you
❤
Thanks ☺️
hallal
ሀበሻ🎉🎉🎉🎉
string is not unambiguous.
Can help?
import iostream and use std::string
I can't find the size() function
Try this function
size_t()
make sure to use it in some function, not in empty space
@@kamisama5783 is that a mac thing?
@@birbylikesfox1032 size_t is not a function, its a data type defined in standard c as unsigned int, its what sizeof returns
the size function is contained within the set namespace of the standard namespace, code bro included using namespace std at the top of the file which is generally bad practice, what you should write it as is std::set::size()