In the visual portion of c++, that is, the MFC AppWizard section, what coding will help me set the number of places after decimal point to 2? I looked in the help index and it says to use SET DECIMAL TO [nDecimal], but this code does not work when I put it in the program like so:
SET DECIMAL TO...
Hi I have a graph with vertices and weights like so:
Atlanta -> Dallas 500
Boston -> Atlanta 600 Chicago 200
Chicago -> Boston 800
If there is no connection between two nodes the value is 5000. What is the easiest way to implement a shortest path algorithm on this type of data?
Hi can anyone give me a basic example of how to code Dykstra's shortest path algorithm? All the examples I have read involve all these superscripts and unexplained variables which are very confusing. I know there is a formula for calculating the shortest path, but I do not know what it is...
How would I disable this warning? :
warning C4786: 'std::reverse_bidirectional_iterator<std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<
char> > >...
Ok I did replace the char* with string, but when I declare a queue:
Queue<string> Q;
I get 4 of these errors:
warning C4786: 'std::reverse_bidirectional_iterator<std::list<std::basic_string<char,std::char_traits<char>,std::allocator<char>...
For example:
string a[20];
The array has values such as:
red
orange
yellow
green
blue .... and so on
How would declare a queue of this type, and read these values into it.
Is it possible to have a queue made up of something like this:
string a[20];
If so, how would you declare the queue, and how would you enQ and deQ things in the array.
How do you remove something from an array? I've done this before, but not for a long time and can't remember.
For example:
int A[5]; //Declare array
Array contains 1, 2, 3, 4, 5
If I know what position the number 2 is at, how do i remove it from the array?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.