I_Interface
lol
rex
rex
anybody knows why it shows 65
Dima
because ‘a’ in ascii is 65
rex
why it doesnot shows 'A'
rex
as i converted to toupper
Anonymous
Hlw
Anonymous
Hlw
What?
Anonymous
why it doesnot shows 'A'
Because toupper returns int
Anonymous
Not char
Anonymous
What😐
What's wrong?
Lionel
A is 65
Anonymous
A is 65
He meant to say 'A' Which is obviously in the context of the talk
Pavel
A is 65
Each character has it coresponding number or index (usually referred as a position in ASCII table). So in some situations you can print this number when you work with a single char (if the function returns it as int, for example, that's afaik the case of toupper)
rex
ok
Dan
Dan
Hey once again! I’ve got problems with bundling my proj, can’t connect mysql source libs via CMake. Could you help me? I didn’t find any solution..
Anonymous
http://unixwiz.net/techtips/reading-cdecl.html
I was looking for something like this. Thanx buddy
JOKER
Type cast it
Harsh
What would happen if we use return 0 with a void main function?
Anonymous
Does anybody know a good youtube channel teaching Data structures and algo for c++?
Harsh
Why don't you try it yourself?
I m not having system to do it... That's why asking you people.
Matteo Fraschini
What would happen if we use return 0 with a void main function?
I suppose the compiler will generate an error
Anonymous
Sumita Arora
Is it a youtube channel? I want dsa series or competitive prog series
Anonymous
I m not having system to do it... That's why asking you people.
You'll get a warning but the program will still run on most popular compilers. It's not defined to be correct though
Matteo Fraschini
I suppose the compiler will generate an error
Better you use return; if you want to exit from the function
Matteo Fraschini
I think you will get an error
JOKER
What would happen if we use return 0 with a void main function?
By default it's always 0 or -1 I assume
Matteo Fraschini
By default it's always 0 or -1 I assume
A void function should not try to return an int
JOKER
A void function should not try to return an int
Technically is shouldn't but in C you gotta return something.. that's why by default it's 0 I guess
JOKER
Any good resources for C++?
JCV
hi friends i need some help building a ssh client to send some commands to a server using sshlib, right now i’m using MacOS and Eclipse
JCV
i have a tons of error when compile
JOKER
You can always ping me @Matteo
JOKER
Well, what I meant was GitHub repositories and all
Nassrullah
Well, what I meant was GitHub repositories and all
Github repositories for c++ ? I don't understand what u mean
Nassrullah
If you want some source codes, you can just google it.
Nassrullah
Sorry, cannot stay for a discussion. i should go. Hope someone will help u.
Anonymous
Anonymous
Hi. Which site is the best to learn c programming
Nassrullah
Hi. Which site is the best to learn c programming
Use books I think it's better.
Nassrullah
Read first book for beginners and a second one for advanced stuffs. And be happy
Nassrullah
Of course it may not be enough but it will be something.
Anonymous
Nassrullah
Ook. But do you know of any site
For the books Amazon is enough. But all the great books I've read were in french so I cannot really recommend you a book sorry.
Nassrullah
Maybe you should start with the book of Ritchie and Kernighan. I think the title is the c programming language.
Anonymous
Ook
#cppbookguide
Anonymous
Insert all the priority queue element into vector in cpp in one go while declaring a vector. is That supported in cpp? priority_queue<int> q; //elements inserted into the priority queue vector<int> v(q.begin(),q.end()) Something like the above thing?
Anonymous
Looks good
Sadly, It didn't work.
Anonymous
Why
Anonymous
Why
priority_queue has no member begin and end
Anonymous
error: 'class std::priority_queue<int>' has no member named 'end'
Anonymous
priority_queue has no member begin and end
Well it doesn't have these member functions
Anonymous
Well it doesn't have these member functions
Any other work around to do the job?
Artöm
No
Anonymous
Any other work around to do the job?
Pop every element from the queue and then push back to vector
Artöm
Maybe you dont need priority_queue?
Anonymous
Anonymous
Pop every element from the queue and then push back to vector
Don't forget to reserve space for the vector
Anonymous
Anonymous
Maybe you dont need priority_queue?
Well, I wanted the inserted elements into queue in a decreasing order
Anonymous
So, may be that what priority_queue lack. Got to find some other way
Anonymous
Well, it doesn't even support upper_bound and lower_bound like functions.
Francisco
hmm
Try using a regular std::vector and the algorithms std::make_heap, std::push_heap, std::pop_heap using the vector iteratos
Francisco
In the end, std::priority_queue is an adaptor over a vector with certain operations. By using those algorithms, you basically have one