ccubed's Profile
Reputation: 129
Stalwart
- Group:
- Author w/DIC++
- Active Posts:
- 1,295 (0.72 per day)
- Joined:
- 13-June 08
- Profile Views:
- 13,851
- Last Active:
May 19 2013 10:44 AM- Currently:
- Offline
Previous Fields
- Country:
- US
- OS Preference:
- Who Cares
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Scion
- Dream Kudos:
- 275
Latest Visitors
-
Precise 
18 May 2013 - 13:24 -
darek9576 
15 May 2013 - 07:07 -
modi123_1 
12 Apr 2013 - 12:04 -
SarumanTheWhite 
05 Apr 2013 - 19:46 -
johanSmith633 
03 Nov 2012 - 01:33
Posts I've Made
-
In Topic: Socket Wrapper Errors
Posted 16 May 2013
Skydiver, on 16 May 2013 - 10:32 AM, said:As an aside, your line 44 of ws2wrap.h should be between lines 2 and 3.
Anyway, are those all your files, or do you have more? The type of error above usually comes up when you have circular header file dependencies.
In your case, though, I suspect that it is the capital 'P' on private on line 20 which is the source of your problem.
That's all of them.
As an aside, I actually took most of this code right from: http://msdn.microsof...1(v=vs.85).aspx
All the socket stuff is basically copy pasted with different values. And if I copy paste that whole document it compiles fine.
I keep trying this in codeblocks too and it basically tells me the same thing.
C:\Users\Charles\github\Programming\C++\Socket Wrapper\Winsock 2.0\Winsock2Wrapper\WS2Wrap.h|43|error: abstract declarator '<anonymous class>' used as declaration|
Not sure how class WS2Wrap is anonymous.
And I fixed my own problem. I would really like to know what was wrong with WS2Wrap, but apparently it doesn't like it. I had to change my class name to Winsock2Wrapper. -
In Topic: Variable not being passed between functions.
Posted 16 May 2013
jimblumberg, on 16 May 2013 - 06:37 AM, said:If you "expect" these warnings then I suggest you read your compiler documentation to see if you can turn these warnings off.
Or maybe it's time you upgraded your compiler. What version of the compiler are you using?
In my opinion, tr1 should be considered depreciated in favor of the current C++ standard, C++11.
Jim
At the time, Visual Studio was the only IDE that had a definition for TR1. C++11 did not exist yet either. The TR1 warnings were simply an example from awhile ago. Now however, C++11 is TR1 so you're right, there's no reason anymore to use TR1.
I use Visual Studio 2012 Ultimate, the example from TR1 was from 2010.
Me personally, the safe version warnings can be ignored. If you know you don't want the safe warnings well then that's your choice. The Win32 API does this a lot. I could turn them off, I don't particularly want to, because sometimes I do mean to use safe and forget to. I don't like turning any warnings off and I like to have the verbose and strict warning settings. -
In Topic: Variable not being passed between functions.
Posted 16 May 2013
-
In Topic: Variable not being passed between functions.
Posted 16 May 2013
sepp2k, on 16 May 2013 - 06:01 AM, said:
ccubed, on 16 May 2013 - 01:55 PM, said:Also, based on your above code this shouldn't compile. You pass 0 to functions that require a pointer to a float variable.
The code does (and should) compile just fine. It is perfectly valid to pass 0 to a function expecting a pointer - that will simply call the function with a null pointer. Of course those functions shouldn't be called with null pointers as arguments, but the compiler doesn't know that.
I consider Any code that produces warning to not be compiled(unless those warnings are normal), that's also why I said shouldn't within the context of it does but really shouldn't.
I guess you can say I'm a fan of strict type enforcement. -
In Topic: Variable not being passed between functions.
Posted 16 May 2013
Why would radius be passed to any other function? As it stands right now you are just passing zero.
Also, based on your above code this shouldn't compile. You pass 0 to functions that require a pointer to a float variable. You can pass 0 for the function that requires a straight float variable, but only for that one argument. As to parameter lists.
Input Radius takes a pointer to a float. IE
Float *myExample;
Volume takes a float variable and a pointer. IE
Float *myExample; Float vol;
I think you can get the last one.
Also, int main not float main.
My Information
- Member Title:
- It's That Guy
- Age:
- 24 years old
- Birthday:
- April 2, 1989
- Gender:
-
- Location:
- Never, Never Land.
- Interests:
- Programming, Gaming, Hanging Out, Chatting, Blogging, Forum Posting.
- Full Name:
- Cooper
- Years Programming:
- 7
- Programming Languages:
- C++,VB,VB.NET,C#,Python,Ruby,(X)HTML,ASP.NET, PHP, Javascript
Contact Information
- E-mail:
- Click here to e-mail me
- AIM:
-
thecoop89@aol.com
- Website URL:
-
http://c3dude.wordpress.com
- Xfire:
- ctheknight
|
|


Find Topics
Find Posts
View Reputation Given





|
Comments
ccubed has no profile comments yet. Why not say hello?