Hello,
I'm wondering why is the following code working (although it shouldnt):
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main() {
Type: Posts; User: l2u
Hello,
I'm wondering why is the following code working (although it shouldnt):
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main() {
Hello
I have implement polyphase extern sort with c++ and I have no idea where to start. I know a little about merge extern sort (the basics) and I've been wondering if there are any c++...
Hello
I'd like to measure time complexity that its needed for some algorithm/function to complete in my c++ application. I'd like to have it in miliseconds, double format (example: 0.253ms)
...
Hello,
Been wondering what is the time complexity of algorithm if we erase all elements in a linked list?
Also what is the big O notation (complexity) difference betwen erasing element in a...
Thanks for explanation!
Hello,
Why wont the following code assign 0.5 to variable (double type):
unsigned int num = 1;
double d = num/2;
Thanks for help!
Hello,
I got stuck at solving some problem.
We have two cities that are connected with two roads and betwen those two paths/roads we have regional roads. We know the time that is needed to pass...
Hello
Why will the following code output integer c as 0 (null)?
unsigned int c = pow( (double)2 , (double)1000);
std::cout << c << "\n";
What would be the proper way of calculating 2^1000...
I need that twodimensional bool array to write in all possible combinations of 0 and 1 without repeating.
So if I have a variable x = 3 (which means number of cells)
There are 3^2 (8) possible...
Should that really work?
This will give me an error:
bool **arr;
arr= new bool[x][2];
I dont have to resize it once its allocated.
Because I'm not allowed to use vector.
Hello
I need a 2-dimensional dynamic bool array with 2 fixed columns and dynamic number of rows.
bool *name[2];
name = new bool..?
What would be the proper way of implementing it?
I looked at vector reference but I couldnt find 'find' member.
Are you sure it exists?
Thanks!
Hello
I have 2 vectors which I want to compare if they contain the same element(s) (not all elements, just some specific). They hold 'some class' objects.
What would be the best way to compare...
Do you think its better to have static class functions or global in such cases?
Is non-member function meant to be global function that takes a reference of datatype as an argument?
datatype is a map in my case and datatypes in both classes are the same.
Hello
When you have particular function (which is just one) in more classes that does the same thing with some specific element (member) what approach do you take to solve that problem?
For...
All the elements are added at the beginning (or in rare occasions such as if configuration file is reloaded). So then it shouldnt be a problem using a vector (which would after sort and erasing...
I never thought of that..
And after sorting it use unique algorithm so that the vector would keep unique elements at the first place and there wouldnt be need of changing types afterwards?
For looping through the containers.
If you have more iterators inside one function, how would you call them?
For instance:
std::vector<std::string>::iterator vec_iter;
std::vector<std::string>::iterator vec2_iter;...
Hello
Is it possible to do the following (without template argument list):
Registry::Inside::Type some_type;
with this code: