CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: HouseMD93

Search: Search took 0.03 seconds.

  1. Re: how to send mails from VC++ program without using outlook

    Well, i rly like your code but... Most servers currently need TLS/SSL support, which i do not know how to implement.
  2. Replies
    10
    Views
    1,184

    Re: get command problem...

    I understand then that the method i've been using leads me nowhere. But what do you mean by 2) ?? I use this usually char buffer[100] but i can read it into a string anyway with this:
    ...
  3. Replies
    10
    Views
    1,184

    Re: get command problem...

    I edited the script a little so it either chooses len or until.

    string get(char buffer[],int from, int until, int len)
    {
    int end = min(until,len-from);
    return string( buffer+from , buffer+end...
  4. Replies
    10
    Views
    1,184

    Re: get command problem...

    crash using 4), std::bad_alloc -_-
  5. Replies
    10
    Views
    1,184

    Re: get command problem...

    What? Binary data? What can i use then (You do realize after the chars of 0 1 2 3 4 etc) i do get letters so what do i use? Even appending correct letters 1 at a time doesn't work :( What the hell!
  6. Replies
    10
    Views
    1,184

    Re: get command problem...

    I am using sockets to receive, so len is len the real length. The reason why i use len in the first place, is because the characters i receive are for example the char of 0. I shall try again but i...
  7. Replies
    10
    Views
    1,184

    get command problem...

    string get(char buffer[],int from, int until, int len)
    {
    return string(buffer,from,until);
    }

    It gives me some weird handling exception: std::out_of_memory!?

    I thought strings can take up...
  8. Replies
    9
    Views
    1,090

    Re: Memory Leak Problem!

    Ok thanks, although i have to rewrite every piece of code i have written. Atleast this way i won't get a memory leak.
  9. Replies
    9
    Views
    1,090

    Re: Memory Leak Problem!

    Will it be ok if I use char instead of the pointer: char*?

    Will that also cause a memory leak?
  10. Replies
    9
    Views
    1,090

    Re: Memory Leak Problem!

    Another problem:

    What happens if you do
    printf(get(...para's))
  11. Replies
    9
    Views
    1,090

    Re: Memory Leak Problem!

    oh i see, thanks! :)
  12. Replies
    9
    Views
    1,090

    Memory Leak Problem!

    char* get(char buffer[],int from, int until, int len)
    {
    int a = from;
    int b = 0;
    int end = from+until;
    char *lol;
    lol = new char[until+1];
    while (a < len && a <= end) {
    lol[b] = buffer[a];...
  13. Replies
    7
    Views
    4,508

    Re: Convert from integer to ascii...

    Weird... Doing it like that, i get a bunch of -1's for recv (I am using select command to detect if its time to receive) and sometimes 2 and 1 etc... So i am not sure whats going on...
  14. Replies
    7
    Views
    4,508

    Re: Convert from integer to ascii...

    Thanks for the info. Btw, by doing setting the limit to 4 each time, Wouldn't that mean i will not know the end of the message; Assuming i get, for example, 2 messages sent to me at once?

    The way...
  15. Replies
    7
    Views
    4,508

    Re: Convert from integer to ascii...

    I used connect to bind the ip address and port to the socket, so i wouldn't have to use recvfrom but just recv.

    Anyway, i did the second one: recv(socket,(char *)&i,sizeof(i),0) already which gave...
  16. Replies
    7
    Views
    4,508

    Re: Convert from integer to ascii...

    Ok i try to provide more info, but i am not sure why you would need more. Anyway, here goes:

    The sender is sending information like this: mertea (for example) and each number of those letters...
  17. Replies
    7
    Views
    4,508

    Convert from integer to ascii...

    I am using an integer to receive values from sockets (recv). But i need them as ascii values, but they need to be able to go higher than 255, which is the reason i cannot use char for the recv.

    So...
  18. Replies
    9
    Views
    1,710

    Re: using something instead of char for recv?

    That may be so, but i have given u enough clues. I used char buffer[size] for recv and used buffer[0] etc to interpret the message eg if (int)buffer[0] == 2 { eat_kellogs; }

    One piece of...
  19. Replies
    9
    Views
    1,710

    Re: using something instead of char for recv?

    I found that doing this: printf("&#37;d %d %d %d",buffer) using int to receive it, would print out many numbers which are different, more specifically the other values received, so now it would be nice...
  20. Replies
    9
    Views
    1,710

    Re: using something instead of char for recv?

    basically, it was sent like this (putting it in a printf way).

    printf("&#37;c%c%c%c",0,1,2,3) for example and each number means something, which the program is supposed to interpret.

    ofcourse i...
  21. Replies
    9
    Views
    1,710

    Re: using something instead of char for recv?

    Problem: I cannot use it as an array? how can i get the data? as the program i have sends numbers like 0 1 2 3 4 5 (as chars). but when i use that int, it just comes a bunch of numbers
  22. Replies
    9
    Views
    1,710

    Re: using something instead of char for recv?

    Cool... thanks =D
  23. Replies
    9
    Views
    1,710

    using something instead of char for recv?

    I am using sockets to receive chars over 256 and as you know char has a range from -128 to 127. Theres my problem, i cannot use anything besides char to recv. Is there any way to convert it to...
Results 1 to 23 of 23





Click Here to Expand Forum to Full Width

Featured