User Profile

Collapse

Profile Sidebar

Collapse
emp
emp
Last Activity: Jul 15 '16, 05:06 PM
Joined: Nov 9 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • emp
    replied to Multicast UDP in VS6 C or C++
    in C
    I had found that link last week and it created more questions. The struct ip_mreq_source is not defined anywhere in my VS6 environment. I found a definition of the struct on line and I implemented it in an existing header file. Next IP_ADD_SOURCE_M EMBERSHIP and IP_DROP_SOURCE_ MEMBERSHIP were undefined anywhere in the VS6 environment. I found them online and defined them with a #define. The variables grpaddr, srcaddr, iaddr are left to the...
    See more | Go to post

    Leave a comment:


  • emp
    replied to UDP Client socket in Visual Studio c++ ver6.0
    in C
    It does go away in the release build. So I will add the pragma. Thanks for the help
    See more | Go to post

    Leave a comment:


  • emp
    started a topic Multicast UDP in VS6 C or C++
    in C

    Multicast UDP in VS6 C or C++

    Plenty of examples on line for later versions of Visual Studio.

    I have the MSDN for VS6.0

    There is no mention of Multicast UDP sockets. There is Broadcast. Looking at the socket options I find SO_BROADCAST. There is no corresponding MULTICAST socket option. Does anyone know if it even exists or am I chasing a Holy Grail????

    Thanks

    -E
    See more | Go to post

  • emp
    replied to UDP Client socket in Visual Studio c++ ver6.0
    in C
    Warning C4786 still persists, even with the addition of the suggested #define.
    See more | Go to post

    Leave a comment:


  • emp
    replied to UDP Client socket in Visual Studio c++ ver6.0
    in C
    The warnings reference <vector> and <bytes> and a bunch of std:: things that must just be included in various .h files.
    See more | Go to post

    Leave a comment:


  • emp
    replied to UDP Client socket in Visual Studio c++ ver6.0
    in C
    I had already looked at this link. I put pertinent pieces of this code into my app. After several compile errors I found extra .h files that needed to be included and I got it to compile, albeit with 172 warnings, all associated with the socket header files. I'm far from testing it, but..... I'm not feeling comfortable having all those warnings. You can usually live with a couple, but 172 is excessive.
    See more | Go to post

    Leave a comment:


  • emp
    started a topic UDP Client socket in Visual Studio c++ ver6.0
    in C

    UDP Client socket in Visual Studio c++ ver6.0

    I have functioning UDP socket code written in C++ from a LINUX platform. Winsock.h or Winsock2.h

    My task is to port it to Windows. Unfortunately the development environment I have is Visual Studio 6.0 has differing constructs than the gcc compiler world on LINUX. Internet searches provide me plenty of .net solutions but nothing really for VS6.0.

    Can someone either direct me to a link that contains such info or provide...
    See more | Go to post

  • emp
    replied to hex string conversion to integer
    in C
    Certainly, and thanks
    See more | Go to post

    Leave a comment:


  • emp
    replied to hex string conversion to integer
    in C
    I managed a fix.

    const * temphold;

    then

    temphold = hold.c_str();
    int byte_count = strtol(temphold , &ptr, 16);

    This correctly decodes the two bytes in temphold to the correct decimal value.
    See more | Go to post

    Leave a comment:


  • emp
    replied to hex string conversion to integer
    in C
    If I remove the std:: from before strtol I get this error which I cant beat either

    c:\program files\microsoft visual studio\myprojec ts\rcmprogrammi ng\file_operati ons.cpp(111) : error C2664: 'strtol' : cannot convert parameter 1 from 'class std::basic_stri ng<char,struct std::char_trait s<char>,class std::allocator< char> >' to 'const
    char *'
    No user-defined-conversion operator available that can perform...
    See more | Go to post

    Leave a comment:


  • emp
    replied to hex string conversion to integer
    in C
    Ok, there is the exact block of code that I am using:
    Code:
    std::string hold =   text[i].substr(2, 1);
    std::cout << "hold = " << hold << std::endl;	
    int byte_count  = std::strtol(hold, &ptr, 16);
    and here are the errors:

    file_operations .cpp
    c:\program files\microsoft visual studio\myprojec ts\rcmprogrammi ng\file_operati ons.cpp(112) : error C2039: 'strtol' : is...
    See more | Go to post

    Leave a comment:


  • emp
    started a topic hex string conversion to integer
    in C

    hex string conversion to integer

    Yes 6.0

    I am using code similar to this:
    Code:
    #include <stdlib.h>
     #include <stdio.h>
    
     int main(void)
     {
     char string[] = "0D76";
     long value = strtol(string, NULL, 16);
     printf("value of '%s' is %ld\n", string, value);
     return 0;
     }
    I have this application running in VS2015 but cannot get it to output an...
    See more | Go to post

  • Understood, and that's the fix, thanks a bunch

    emp...
    See more | Go to post

    Leave a comment:


  • emp
    started a topic compiler error expected primary-expression before token
    in C

    compiler error expected primary-expression before token

    I have the following class, the primary-expression error takes place in the constructor before "{" token where the maskval[16] array gets initialized.

    any help would be appreciated

    emp1953
    [code=cpp]
    class encoderclass
    {
    public:

    //vars
    long maskval[16];
    float bitval[15];

    //methods
    short encodeCosineDat a(float);
    float...
    See more | Go to post
    Last edited by sicarie; Dec 13 '07, 06:42 PM. Reason: Code tags

  • emp
    replied to Deployable exe in VB6.0
    That is what I had already done. I end up with a package that will not run on a machine without MS VB6 installed on it....
    See more | Go to post

    Leave a comment:


  • emp
    started a topic Deployable exe in VB6.0

    Deployable exe in VB6.0

    I've tried to follow the steps in the MSDN without success.
    I need to create a deployable exe.

    Does anyone know of an internet source that I can go to that is better than the MSDN?

    Thanks

    emp1953
    See more | Go to post

  • emp
    replied to VB - loop
    Is this VB6.0 VB5 or .net?
    For example: If there were 5 items in the list box. If You moved item 5 to location 4. Do you want to keep item 4 or throw it away?
    Do you want to swap location 4 with 5 and 5 with 4?

    emp...
    See more | Go to post

    Leave a comment:


  • emp
    replied to Pointer questions - GNU c++ on a unix platform
    in C
    Duh! My brain is on caffeine overdose. I hope I don't have to bother you guys with this any more

    Thanks again...
    See more | Go to post

    Leave a comment:


  • emp
    replied to Pointer questions - GNU c++ on a unix platform
    in C
    ############### ############### ############### #######

    Thank You Max, that got rid of the can't convert msg_struct** to msg_struct* error

    I still have the compiler error
    expected unqualified-id before '.' token

    Which I assume is the msgIn-> in my cout....


    emp1953...
    See more | Go to post

    Leave a comment:


  • emp
    replied to Pointer questions - GNU c++ on a unix platform
    in C
    Sorry, a correction to my most recent code pose

    error: cannot convert msg_struct** to msg_struct* for argument 1 (""this refers to the case 0 call to printFunc in the switch")

    error: expected unqualified-id before '.' token (""This refers to the couts, referring to the msgIn->")
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...