Perhaps it's not there in the code, and part of the reason he's getting errors. I'm simply making a logical assumption, as all of the brackets are definitely not there.
Type: Posts; User: relyt_123
Perhaps it's not there in the code, and part of the reason he's getting errors. I'm simply making a logical assumption, as all of the brackets are definitely not there.
Along with the missing bracket, you also fail to include the correct library for system, as well as don't have the latter part of the do-while loop.
Edit: On the other hand, for what you have so...
One thing I see very quickly which would screw it up royally is this:
...
for(int i=0; i<=points.size()-2; i+=2)
{
tx = points[i].x;
ty = points[i].y;
You also don't have a closing bracket on your main() function. You should put system("pause") and return 0 outside of the switch/case. Otherwise, the only way the program will end properly is if the...
Aha. That's exactly what I was looking for. I figured there was something similar to that to deal with it. Thanks for the help.
In the code:
vector<data_one> entries(3);
Does the (3) simply...
I'm just sort of playing around making a sort of database system, though I haven't gotten too far with it.
I'm using a struct to hold each user's information: Name, ID, and what not.
To keep...
Ah, yes. That would affect it. However, it still throws the same error, and it won't compile.
Line 37 (cout << roomRef[0].descOut();
error: no match for 'operator<<' in 'std::cout'
Are...
Ah, I see. I didn't realize you could initialize an object and push it into a vector at the same time. I decided to use classes; however, how would I refer to individual variables in that class that...
#include <iostream>
#include <vector>
using namespace std;
struct room {
int roomID;
};
void valueSet();
Ah, OK. That clears it up. Now, I have this:
list::list() {
root = endpos = NULL; // Sets root to NULL, and endpos to NULL
}
void list::node_add(int value) {
endpos = new node; //...
Okay, so I should set root to point to a new node, and then just set the root->next value? What about root->value? Isn't it still unitialized? 'root' isn't supposed to contain a 'value', correct?
root = endpos = NULL;So, when you're doing that, I'm not sure what exactly it's doing. Is root still a pointer to a node? What happens when you set the pointer to NULL. It simply points to nothing?
Ah, thank you for the help.
I completely re-wrote it and came up with:
#include <iostream>
using namespace std;
struct node {
Alright, well I tried my first attempt at creating a linked list. It didn't work out so well.
#include <iostream>
using namespace std;
struct node {
int key_value;
node *next;
I realize that. It's just that I had no way to debug it if I didn't know the arguments in the first place, eh? :p
No one ever told me what those arguments were... I would have looked them up if I had known that was the issue.
Thanks for the help.
Like that, it compiles, but the dialog box is still strange in size. It is merely a small box ~10px wide and the heigh of the title bar of the window.
I am into 'main.cpp'.
Edit: Should I include "resources.rc" into main.cpp?
I have three files:
-main.cpp:
#include <windows.h>
...
...
-resource.h:
This doesn't work. I put it in the .rc file and it wouldn't compile. Said the error was 'Syntax Error'.
When I transferred the code into the .cpp it had two errors:
error: expected...
I'm fairly new to Win Programming.
For the DialogBox function (http://msdn2.microsoft.com/en-us/library/ms645452.aspx) what is the 2nd parameter, exactly? I see that it says you can use...
Yup. That's the same page I downloaded it from. It said the same thing, that there was a 30 day trial, for both VC++ and VB. Though, Code::Blocks seems to be to my likings anyway so I think I'll...
I tried VC++ 2005 Express but it said it was a 30 day trial. I'll try out Code::Blocks.
Yup. Figured that out already. :D
Dev-C++ Compiler; Version 4
Ahh. The thought of using Vectors never even came to mind. Thanks. ^^
However, I've come to yet another problem.
Something like this gives me an error:
for(int i=0; i<=goblin.size();...