|
7h
|
|
comment |
What is wrong with my code Your original statement was- compilier says that there is an error and it is not offering help- which is what you'd get from NetBeans. They do not provide you with verbose errors b/c they want you to figure it out. If you're saying that a valid answer must include the errors pointed out in the answers here, then see Patashu's last comment. |
|
7h
|
|
comment |
What is wrong with my code None of that matters. This is a simple explanation about the static method you seem to be scared of. Basically what you will be doing is imitating what is provided for you by the site i.e., a way to call your method. |
|
7h
|
|
comment |
What is wrong with my code Build a driver for your program. A simple program that is an interface to the code you'll be putting on the site. Once you validated it paste the code in question onto the site. Setting up your own project in NetBeans is too easy for that to be your excuse. |
|
7h
|
|
revised |
What is wrong with my code fixed formatiing |
|
7h
|
|
comment |
What is wrong with my code But you're not getting the descriptive error message that is the most informative part of the error. As if you didn't know there was an error when it wouldn't compile! |
|
11h
|
|
comment |
How can I make this program a bit more efficient? No problem. I believe the issue comes from the last data set having the shortest path as a direct path to the destination and mine doesn't check for that. If you notice it returns exactly twice the actual next shortest distance so I think I should be breaking out somewhere. |
|
1d
|
|
comment |
Compiling a C application on Windows [Originally written for Linux] Actually this may be a better starter. |
|
1d
|
|
comment |
Defining a class in c++ There are plenty of tutorials available. |
|
1d
|
|
comment |
Defining a class in c++ @judas: You've apparently skipped over an important part of the book. Maybe go back and review where they taught how to do that sort of thing. |
|
1d
|
|
comment |
Defining a class in c++ That is not a class definition. |
|
1d
|
|
comment |
How can I make this program a bit more efficient? That's what I said. Read the post again. I just wrote what I was thinking would be an easy way to meet the requirements. You'll have to resolve that. |
|
1d
|
|
comment |
ASCII number for "space" is not being detected @user2411568: as @Jon Skeet has pointed out, I was pointing out an option which won't change the current operation of the code. If you do use it, you just replace the x = x + 1 with x++.
|
|
1d
|
|
comment |
ASCII number for "space" is not being detected @Jon Skeet: I know this. That's why it says "...if you like!" Anyway am I the only person who's not allowed to comment without it being specific to the solution. See a million other comments on a million other posts. |
|
1d
|
|
comment |
ASCII number for "space" is not being detectedx = x + 1; => x++ or x += 1;, if you like!
|
|
1d
|
|
comment |
How can I make this program a bit more efficient? Unfortunately if you're not meeting the time constraints you almost have no choice. I think you should ask yourself, "what is this priority_queue for?" It needs to be removed! There isn't any reason to even care about any priority. The data sets are given starting at 0 and continuing. All paths must start at 0, so those and their paths are the only ones you're interested in. That was more of the point of my example which, by the way, took no time to do. Maybe you should look and see how I'm able to find the shortest path by only following paths that begin with 0. |
|
1d
|
|
comment |
Visual Studio12 doesn't find my dlls I think you might have changed a setting along the way. Have you tried to delete the solution file and do a new build? If that doesn't fix it, or even if you want to cut to the chase, you could back your current settings up and reset them to default. |
|
May
20 |
|
comment |
Syntax error...trying to run a C - program Formatting your code goes a long way for readability. I handled it for you this time. |
|
May
20 |
|
revised |
Syntax error...trying to run a C - program fixed formatting |
|
May
20 |
|
comment |
C Programming File I/O @Cranderberry: it may not have done anything but it's good practice to close your file resources when you're done with them. In this case, because your program terminates directly after - it's handled(not true in all languages), but it won't always be so. |
|
May
20 |
|
comment |
Accessing data from web in Visual Studio 2010 Here it is. |