User Profile

Collapse

Profile Sidebar

Collapse
sanYAua007
sanYAua007
Last Activity: Oct 25 '07, 07:55 AM
Joined: Oct 17 '07
Location: Ukraine
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sanYAua007
    replied to Problems with FILE pointers
    in C
    Hi.
    It is the reason of program crashing, because when you assign your pointer with file, using fopen() system closes previous connection to this file. So when you try to use it later, you get crash.

    Code:
    ........
    f1=fopen();
    f2=fopen();//after this f1 points to nowhere
    ........
    See more | Go to post

    Leave a comment:


  • sanYAua007
    started a topic TServerClientThread problem
    in C

    TServerClientThread problem

    Since yesterday I've sticked at problem how to read the data from blocking socket connection, using thread. Can anyone help on this?

    I'm writing server-application (SA) and client-application (CA) in C++ Builder 6 under Windows OS.

    In CA I use TClientSocket's component ClientSocketSta t and in SA TServerSocket's component ServerSocketSta t to exchange data. If no data passed in 5 seconds I need to close the connection....
    See more | Go to post

  • sanYAua007
    replied to Creating an array using class in C++
    in C
    Hello yue219!

    You need something like this.
    Code:
    #include <iostream>
    //-------------------------------------------------------   
    class cGrid
    {
      public:
         cGrid(int _r, int _c)   //Constructor
           :R(_r),C(_c)//Initialize dimensions
         {
            Template=new char*[R];
            for (int i=0; i<R; ++i)
            {
              Templat
    ...
    See more | Go to post

    Leave a comment:


  • Hello CyOnide!

    1.If both of classes contain three values of the same type(looking at their constructors it seems so) you should use one class (f.e. object).
    Code:
    class object
    {
        public:
           object::object(int v1,double v2,int v3):val1(v1),val2(v2),val3(v3){} //constructor 
           int val1;
           double val2;
           int val3;   //class fields
    };
    ...
    See more | Go to post

    Leave a comment:


  • sanYAua007
    replied to Help counting individual inputs in an array.
    in C
    This is one of the ways to solve your task:

    Code:
    #include "stdafx.h"
    using namespace std;
    //---------------------------------------------------------------------------
    
    <spoonfeeding code removed>
    ...
    See more | Go to post
    Last edited by weaknessforcats; Oct 18 '07, 05:15 PM. Reason: Removed spoonfeed

    Leave a comment:


  • sanYAua007
    started a topic Failed to create TWinSocketStream object
    in C

    Failed to create TWinSocketStream object

    Please, help me to solve such a problem:

    I'm writing server-application (SA) and client-application (CA) in C++ Builder 6 under Windows OS.

    In CA I'm using TClientSocket's component ClientSocketSta t and in SA TServerSocket's component ServerSocketSta t to exchange information.

    On ServerSocketSta t's event OnGetSocket I initialize and start cStatThread's thread object ( class cStatThread is derived from...
    See more | Go to post
No activity results to display
Show More
Working...