User Profile

Collapse

Profile Sidebar

Collapse
MrError
MrError
Last Activity: Feb 16 '14, 03:26 PM
Joined: Dec 31 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MrError
    replied to Socket Programming
    in C
    oh man...
    i am too dumb.. the traditional mistake.. ";"
    anyway.. thanks for your help.. i appreciate that.. :)
    See more | Go to post

    Leave a comment:


  • MrError
    replied to Socket Programming
    in C
    My linking problem is resolved.. thanks to you.. but now i am having another problem..
    why my code is not creating the socket... the descriptor is always -1..!!
    Here is the code.

    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <conio.h>	
    #include <winsock2.h>
    using namespace std;
    int main()
    {
    	int descriptor;
    
    	if ((descriptor = socket(PF_INET,
    ...
    See more | Go to post
    Last edited by Rabbit; Feb 16 '14, 10:46 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data. Second warning.

    Leave a comment:


  • MrError
    replied to Socket Programming
    in C
    i went to
    project->project options->parameters->add library
    and then browse
    C:\Program Files (x86)\Microsoft SDKs\Windows\v7 .1A\Lib
    and added Ws2_32.lib... but still getting the error :(
    See more | Go to post

    Leave a comment:


  • MrError
    replied to Socket Programming
    in C
    and how can i do that.!!!
    See more | Go to post

    Leave a comment:


  • MrError
    started a topic Socket Programming
    in C

    Socket Programming

    I have just started to work in socket programming.. I am getting these errors:
    "undefined reference to `__imp_socket'"
    "ld returned 1 exit status"
    my compiler is dev c++ 5.6.1
    here is my code


    Code:
    #include <iostream>
    #include <conio.h>	
    #include <winsock2.h>
    using namespace std;
    int main()
    {
    	int descriptor;
    
    	if ((descriptor
    ...
    See more | Go to post
    Last edited by Rabbit; Feb 16 '14, 04:38 AM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.

  • MrError
    started a topic <div> vs <table>

    <div> vs <table>

    I am working in html and find <div>very helpful..
    My question is, should I stop using table anymore to structure html contents or for any purpose as everything that can be done with table can be done more efficiently with div?
    See more | Go to post

  • MrError
    replied to Why write return 0 at the end?
    in C
    I couldn't understand this (not getting the technical terms like command line program.!):
    they run a command line program in a debug from there IDE. When run this way when the program exits the Window closes so they put in the getch so the program doesn't exit. If run not in debug mode or directly from Windows or from a command prompt, as a command line program is intended to be run, then the results remain on screen.
    See more | Go to post

    Leave a comment:


  • MrError
    started a topic Why write return 0 at the end?
    in C

    Why write return 0 at the end?

    Code:
    #include <iostream.h>
    #include <conio.h>
    int main ()
    {
        cout << "Hello World";
        getch();
        return 0;
    }
    In the above code, why is it necessary to write getch() and return 0? What is their purpose?
    See more | Go to post
    Last edited by Banfa; Jan 22 '13, 04:26 PM. Reason: fixed the code tags

  • MrError
    replied to What is the actual concept of delete operator?
    in C
    Got it.
    Thanks a lot for your help.
    See more | Go to post

    Leave a comment:


  • MrError
    replied to What is the actual concept of delete operator?
    in C
    What do you mean by explicitly calling delete and no, it did not crash!
    See more | Go to post

    Leave a comment:


  • MrError
    started a topic What is the actual concept of delete operator?
    in C

    What is the actual concept of delete operator?

    Hello all. I am c++ beginner. I am not getting the real concept of delete operator. If it deallocates the memory, then why i am getting such output..!!


    Code:
    int main()
    {
        int *a , b=5;
        a = & b;
        cout << *a << endl;
        delete a;
        cout << *a;
        getch();
        return 0;   
    }
    Output:
    5
    5
    See more | Go to post
    Last edited by zmbd; Dec 31 '12, 02:43 PM. Reason: [Z{Please use the <CODE/> button to format posted code/html/sql}]
No activity results to display
Show More
Working...