ccubed's Profile User Rating: -----

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:
User is offline 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

Icon   ccubed is bored.

Posts I've Made

  1. In Topic: Socket Wrapper Errors

    Posted 16 May 2013

    View PostSkydiver, 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.
  2. In Topic: Variable not being passed between functions.

    Posted 16 May 2013

    View Postjimblumberg, 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.
  3. In Topic: Variable not being passed between functions.

    Posted 16 May 2013

    View PostSkydiver, on 16 May 2013 - 06:25 AM, said:

    What warnings do you consider normal vs warnings which are not normal?

    If you expect the warning to be there, such as the tr1 warnings in visual studio, then it's normal. The tr1 warnings as an example basically just say 'This is new.'
  4. In Topic: Variable not being passed between functions.

    Posted 16 May 2013

    View Postsepp2k, on 16 May 2013 - 06:01 AM, said:

    View Postccubed, 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.
  5. 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:
AIM  thecoop89@aol.com
Website URL:
Website URL  http://c3dude.wordpress.com
Xfire:
ctheknight

Comments

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