Forum
A place to discuss topics/games with other webDiplomacy players.
Page 1059 of 1419
FirstPreviousNextLast
Draugnar (0 DX)
29 May 13 UTC
I predict an Ohio World Series...
Cincinnati versus Cleveland with Cincinnati winning in 5.
13 replies
Open
Al Swearengen (0 DX)
26 May 13 UTC
Games that End Early
Welcome New Diplomacy Players

50 replies
Open
Mapu (362 D)
28 May 13 UTC
(+3)
It makes me kind of sad
More...
13 replies
Open
Jamiet99uk (865 D)
25 May 13 UTC
(+1)
Bible question: Which bits of the Old Testament still apply?
The bible is confusing... but thankfully this forum is frequented by many expert theologists who I'm sure can help me here. This is not a troll thread, I have an honest question on a matter which genuinely confuses me.
59 replies
Open
goldfinger0303 (3157 DMod)
27 May 13 UTC
The Masters Round 4
Come on guys. Everyone should have received an email a week ago, and only one game has started. Don't make me harass you.
7 replies
Open
MKECharlie (2074 D(G))
29 May 13 UTC
Dialects and Slang
…from other countries/regions of the world (than the one you live in)
11 replies
Open
Tasnica (3366 D)
15 May 13 UTC
Around the World Gunboat Tournament EoG, Game 9
10 replies
Open
Tasnica (3366 D)
30 Apr 13 UTC
(+1)
Around the World Gunboat Tournament EoG, Game 13
gameID=104130

Currently working on my EoG. The short version is that this game is a textbook example of how an unbelievably good start can get completely shut down by guessing wrong many, many times.
14 replies
Open
Draugnar (0 DX)
26 May 13 UTC
Draugnar is hosting a game...
So I just finished up my last active game and am looking to start another. I am recruiting players but reserve the right to exclude and pick and choose who they are.

Anon or not is up for grabs. Buy in is 170 D and the game will be WTA full press. Chime in if your interested and anon versus non preference or requirements.
37 replies
Open
Morandini (137 D)
28 May 13 UTC
Cheaters...
Hi there. What do i have to do to complain about cheating in Gunboat games?
42 replies
Open
Tru Ninja (1016 D(S))
28 May 13 UTC
I just graduated college and have a job
After hearing I got accepted for the position, I find two omens
1) Our rose bush bloomed a dozen roses. Never has this bush given us more than one flower since we moved in years ago
2) I find the first ever dead rotting bird in our yard.
How do I read this??
24 replies
Open
SYnapse (0 DX)
28 May 13 UTC
S(h)itter needed
I've got just one world game on the go, 3 day phases, full press. I'm away from Thursday 30th to Monday 10th June. Would anybody care to stop this CD'ing? Not too concerned about winning.
1 reply
Open
orathaic (1009 D(B))
27 May 13 UTC
What makes us special?
http://www.the-scientist.com/?articles.view/articleNo/35705/title/Behavior-Brief/
2 replies
Open
obiwanobiwan (248 D)
22 May 13 UTC
Oh, Arizona...There's Just No END To Your Minority-Attacking Antics!
http://www.bbc.co.uk/news/world-us-canada-21870064 Aaaaand on today's episode of "Arizona Gone Insane," the state legislature, led by GOP lawmaker John Kavanagh, is pushing for a bill that would require transgendered individuals to show their ID before using a public restroom. "For a handful of people to make everyone else uncomfortable just makes no sense," said Kavanagh. Terribly sorry that protecting minority rights makes Mr. Kavanagh "uncomfortable."
129 replies
Open
ava2790 (232 D(S))
28 May 13 UTC
More drunk stories
First all nighter in New York City after five visits. Was going to get to sleep before my train to Boston. But I guess

http://youtu.be/ELjSe5ggnE8
2 replies
Open
KoreaAru (100 D)
28 May 13 UTC
1 turn ( 10~14 hr
http://webdiplomacy.net/board.php?gameID=119215
http://webdiplomacy.net/board.php?gameID=119151
join
0 replies
Open
2ndWhiteLine (2601 D(B))
28 May 13 UTC
More justice demanded
League complaint. See inside.

34 replies
Open
shadow2 (2434 D)
28 May 13 UTC
WTA, No messaging, Anonymous Game
Russia and Turkey both left the game and Austria is expanding quickly. I feel in a Winner Takes All match, it is unfair for a player to win because the biggest contenders to a country left. It is like Germany and France leaving with a player as England. Turkey and Russia both have 3 SCs.

http://www.webdiplomacy.net/board.php?gameID=118664
1 reply
Open
mlbone (112 D)
28 May 13 UTC
12 hour world gunboat. Sweet and easy!
http://webdiplomacy.net/board.php?gameID=118575
1 reply
Open
Lando Calrissian (100 D(S))
27 May 13 UTC
PARADOX
Per the rules of the site our responsibility is:
• Help the mods & admins keep our server fun.
36 replies
Open
PSMongoose (2384 D)
27 May 13 UTC
Games that make you want to cry...
http://webdiplomacy.net/map.php?gameID=119165&turn=6&mapType=small
5 replies
Open
milestailsprower (614 D(B))
27 May 13 UTC
I'm advertising a game
Oh god it's been so long since I've used the forum.
http://webdiplomacy.net/board.php?gameID=119161
For the slowepokes.
0 replies
Open
Favio (385 D)
27 May 13 UTC
Fantasy Football 2013
Hey all, since it is about time for fantasy football stuff to happen, I am looking to see if anyone is interested in having a webdip group on NFL.com for a fantasy league. Post interest here and send me a pm with your email.
12 replies
Open
Rallidae (108 D)
27 May 13 UTC
starts soon, 4/7 players in, live
http://webdiplomacy.net/board.php?gameID=119136
0 replies
Open
NigeeBaby (100 D(G))
25 May 13 UTC
Sacha Noam Baron Cohen
Just watched the film Bruno which made me wonder ..... what do you guys make of SNBC, is he a hit or a miss?
13 replies
Open
abgemacht (1076 D(G))
24 May 13 UTC
A New Game
Anyone interested in a game?
5-50 D WTA non-anon Classic Full-Press 36-48hr/phase.
15 replies
Open
LakersFan (899 D)
27 May 13 UTC
Game joining extension needed
gameID=117179 still waiting on one player and only three hours time left to join, can the phase please be extended? Thanks!
0 replies
Open
jimgov (219 D(B))
23 May 13 UTC
(+1)
Who do you know in RL?
Many of us know other players in RL. In fairness and for full disclosure, please reveal who you know. Thanks. Oh, BTW, I don't know any of you in RL.
90 replies
Open
Yellowjacket (835 D(B))
25 May 13 UTC
programming queston (MSVisual + cmake + ITK + cpp)
Because people here will answer way faster than the actual forum I posted to ....

http://www.cplusplus.com/forum/beginner/102953/
Tergem (100 D)
25 May 13 UTC
I never used C++, so it's code that I'm not used to reading, keep that HEAVILY IN MIND.

That said, I have used OO Languages for 6 years now (Mostly Java and C#), and it appears that your code appears to have no parsing, or maybe you just wanted the pointers, or maybe I forgot I saw it.

I'll come back later and reply when I haven't been up for 25 hours...
Mapu (362 D)
25 May 13 UTC
Where are you including io.cpp?
semck83 (229 D(B))
25 May 13 UTC
Stupid question, but you made sure that IO.cpp is getting compiled and linked as part of the project?
Mapu (362 D)
25 May 13 UTC
(+1)
haha gmta
semck83 (229 D(B))
25 May 13 UTC
For what it's worth, linker errors of this type mean that a function was defined (such as in a header), but the linker didn't find their definition (i.e., implementation) anywhere. That implementation can't be in a header usually (unless it's a class member), or you'll have the opposite problem of double definition.

In practice, the error is usually caused by the definition's signature being slightly different, or by forgetting to link with the .cpp file where the function resides. You don't appear to be suffering the former problem.
Yellowjacket (835 D(B))
25 May 13 UTC
So Semck, Mapu, including IO.h also includes IO.cpp, right?

That being said, I feel you are is basically addressing the issue. If I actually

# "include IO.cpp"from Reg_script.cxx, I get a different error (double definition of "reader", an error that somewhat makes sense in that context)

Basically, I think in standard c++ doing #include "IO.h" also automatically includes IO.cpp, but I'm not sure that it is being done properly because I'm forced to use the stupid cmake wrapper. I feel I need to let cmakelists.txt know IO.cpp is included, somehow. I just don't know how.
Alderian (2425 D(S))
25 May 13 UTC
I do not know MSVisual or cmake or ITK, but I see a few things that seem odd or wrong or just unnecessary.

Why do you have the typedef lines in main when they are already in IO.h?

In Read_Raw_Data(), the second parameter is char * filename, but then instead of passing filename into SetFileName(), you pass in argv[1] which I wouldn't expect it to know about. Seems like IO.cpp wouldn't compile, which could then lead to your link error.
semck83 (229 D(B))
25 May 13 UTC
No, #include "io.h" does not automatically include IO.cpp. What '#include "io.h"' does is literally place the contents of "io.h" at that point in your file. CPP makes NO connection between io.h and io.cpp. The similarity in names is for your own convenience, but it has no semantic significant to C++.

Compilation occurs in two steps. First, a compiler compiles each .cpp file (not each .h file). The .h files let a given file know that a particular function exists, and that it will be implemented in some (probably different) .cpp file. The compiler generates a .obj file for each .cpp file it is instructed to compile. So for example, reg_script.obj.

The linker then takes all the .obj files and puts them together into an executable. At this point, it expects to find and sort out all the different functions that were declared to exist somewhere "out there" at the compilation stage. If it doesn't find one, it gets very upset. (It has experienced a lot of losers over the years, and it never believes the check is in the mail).

So if you don't tell the compiler to compile io.cpp, and then tell the linker to include io.obj when linking, this will occur, and you will get that error.

And yes, you will get different errors if you #include a .cpp, most likely. Sadly, I don't know how to use cmake. I'll go try to find out though.
semck83 (229 D(B))
25 May 13 UTC
Maybe try an add_directory so you get all the source files in that directory? (I'm not sure that works. I know nothing about cmake, as noted).
Yellowjacket (835 D(B))
25 May 13 UTC
OK, so you're both saying I should #include "IO.cpp," and then fix the errors that come up there? I'll let you know what happens.

Alderian, you are allowed to change the name within the local environment of a function. argv[1] is a global variable, and when it gets passed to the function I've redefined the name. As for typedef, that's a good question.
philcore (317 D(S))
25 May 13 UTC
No, they are both saying not to #include io.cpp. you don't #include cpp files, only .h. you have to add it to your make file to compile it. You have to add all cpp files to your make file in order for them to be compiled into an obj file so the linker can link to it.

#include is a pre-compiler directive. You can think of it as a replacement. as semck said, #include is the same as copying the contents of the file in peace of the #include line. Link errors are post compilation.
Chaqa (3971 D(B))
25 May 13 UTC
(+1)
Just a tip as I don't think you're aware, if you put "using namespace std;" after your includes, but before the main, you won't have to ever use "std::".

It saves some time and makes code a bit clearer, for me at least.
philcore (317 D(S))
25 May 13 UTC
Argv and argc are not global. Their scope is the main() function, just like any other function parameter.
philcore (317 D(S))
25 May 13 UTC
I dint think ip.cpp will compile with the reference to argv in it. If it does, then I've learned something today. But even if it does, its bad style because the implied scope of argv is the main function and you are passing it into another function using the parameter name filename. So continue to use filename in that function si that its clear that its the input parameter your using.

What if you want to call this function with a different filename than the one passed in as the 2nd parameter on the command line? It should still do its job without knowledge of the command line parameters.
philcore (317 D(S))
25 May 13 UTC
I dint think ip.cpp

Should be
I don't think io.cpp
philcore (317 D(S))
25 May 13 UTC
(+1)
And for what its worth, this isn't an object oriented program. This could have just as easily been a c program other than the cpp-specific constructs like templates.

Not that that's a bad thing (for a program this small, oo might be overkill), I just figured, since I was sharing my thoughts on the program, you'd want to hear (or read) all of them ;-)
Alderian (2425 D(S))
26 May 13 UTC
@YJ, to clarify, I was saying that in the Read_Raw_Data() function (or method or routine or whatever you want to call it), the parameter being passed into SetFileName() should be filename, not argv[1]. That has to be fixed before IO.cpp will compile.

But as others have said, the real problem is that you need IO.cpp to be compiled as part of your cmake script or whatever that is. But I don't know anything about cmake so I can't help you with that part.
Yellowjacket (835 D(B))
26 May 13 UTC
" you have to add it to your make file to compile it"

THAT is the step I forgot about (but apparenlty still suspected was the issue). Thanks Phil.

"using namespace std"

I know, but I think I will be using a different namespace after more code is written, and I can only use one, right?

"Argv and argc are not global."

Of course, thanks for the correction. I tend to throw around terms that I don't 100% know what they mean, I'm not a good programmer.

"I dint think ip.cpp will compile with the reference to argv in it"

It definitely won't. And thanks, Alderian, I see your point now. I just didn't realize I had made that error in the code.
Yellowjacket (835 D(B))
26 May 13 UTC
Anyways, somebody more familiar with cmake has given me some links on how to compile it with IO.cpp included. Thanks for the tips, guys.
semck83 (229 D(B))
26 May 13 UTC
"I know, but I think I will be using a different namespace after more code is written, and I can only use one, right?"

No, you can use any number of namespaces. All that "using" does is dump all the names in a given namespace into the global namespace (for that file). You can do this for whatever namespace you want. Of course, if two conflict (have functions with the same name, say) you'll still have to resolve that.

Never put a "using" statement in a header, because then it will automatically be applied in every source file that includes that header, which may be undesireable.


20 replies
Tru Ninja (1016 D(S))
26 May 13 UTC
Anyone on here also playing CoD Black Ops II for PS3?
I play pretty regularly and would love to add your gamer tag. I'm TRUninjaJ.
4 replies
Open
Page 1059 of 1419
FirstPreviousNextLast
Back to top