Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. function passing problem

function passing problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++lounge
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chris28583
    wrote on last edited by
    #1

    ok i have a problem in my main.cpp of my client program, and i have been staring at the screen for so long i can't see what the problem is [code]c:\documents and settings\computing\desktop\client2\main.cpp(17) : error C2660: 'connecttoserver' : function does not take 0 parameters mesagesend.cpp Error executing cl.exe.[/code] [code]#include "connecting.h" #include #include "mesagesend.h" #include #include using namespace std; int main() { connecting client; mesagesend chat; client.connecttoserver(); chat.sendmessage(); client.disconnectfromserver(chat.mysocket); return 0; }[/code]

    M T 2 Replies Last reply
    0
    • C chris28583

      ok i have a problem in my main.cpp of my client program, and i have been staring at the screen for so long i can't see what the problem is [code]c:\documents and settings\computing\desktop\client2\main.cpp(17) : error C2660: 'connecttoserver' : function does not take 0 parameters mesagesend.cpp Error executing cl.exe.[/code] [code]#include "connecting.h" #include #include "mesagesend.h" #include #include using namespace std; int main() { connecting client; mesagesend chat; client.connecttoserver(); chat.sendmessage(); client.disconnectfromserver(chat.mysocket); return 0; }[/code]

      M Offline
      M Offline
      Mike Beckerleg
      wrote on last edited by
      #2

      The connecttoserver function must need one or more parameters. Look in in "connecting.h" (or post it here) to see the parameters the method takes. Mike

      1 Reply Last reply
      0
      • C chris28583

        ok i have a problem in my main.cpp of my client program, and i have been staring at the screen for so long i can't see what the problem is [code]c:\documents and settings\computing\desktop\client2\main.cpp(17) : error C2660: 'connecttoserver' : function does not take 0 parameters mesagesend.cpp Error executing cl.exe.[/code] [code]#include "connecting.h" #include #include "mesagesend.h" #include #include using namespace std; int main() { connecting client; mesagesend chat; client.connecttoserver(); chat.sendmessage(); client.disconnectfromserver(chat.mysocket); return 0; }[/code]

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        ok, i tell you what i see ...

        main.cpp, line 17 :
        client.connecttoserver();

        chris28583 wrote: c:\documents and settings\computing\desktop\client2\main.cpp(17) : error C2660: 'connecttoserver' : function does not take 0 parameters nothing to add... :->


        TOXCCT >>> GEII power
        [toxcct][VisualCalc]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups