User Profile

Collapse

Profile Sidebar

Collapse
hanaa
hanaa
Last Activity: Nov 6 '09, 09:20 AM
Joined: Nov 25 '07
Location: Hyderabad, India.
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hanaa
    replied to A 2D array wrapped in a structure
    in C
    Thank you Banfa. That helped a lot.
    See more | Go to post

    Leave a comment:


  • hanaa
    replied to A 2D array wrapped in a structure
    in C
    But the field 'data' is a part of the structure res. So if res gets destroyed because its a local variable, the contents of the 'data' field should also be destroyed right.. Or is it because data points to malloc'd memory that it is not destroyed?...
    See more | Go to post

    Leave a comment:


  • hanaa
    replied to A 2D array wrapped in a structure
    in C
    If thats the case then p[i][j] should not work too, because its the value of res->data that has been assigned to it. But using p[i][j] shows me the correct values.
    See more | Go to post

    Leave a comment:


  • hanaa
    started a topic A 2D array wrapped in a structure
    in C

    A 2D array wrapped in a structure

    Hello

    This piece of code works. But earlier, I had tried using (res->data[i][j]) in place of p[i][j (in line 40, in the for loop inside main()). And the program used to fail due to an access violation error.

    Then I declared the variable **p within main() and assigned res->data to it. And it worked. Can anyone tell me why using res->data[i][j] didnt work. If u can, please do.

    Code:
    #include<stdio.h>
    ...
    See more | Go to post

  • hanaa
    replied to Return a 2D array using pointers
    in C
    Please ignore this thread

    I am so very sorry.

    I forgot to write the return statement in the callee.
    See more | Go to post

    Leave a comment:


  • hanaa
    started a topic Return a 2D array using pointers
    in C

    Return a 2D array using pointers

    Hello

    I need to call a function that returns a 2D array. I need to dynamically allocate memory for the array in the callee. Now, I return using a pointer to a pointer.

    In the callee, I allocate the memory using mallloc, assign values to the array elements, output using printf in the callee. Eveything works fine.
    But in the caller function, I am unable to access the array elements using the pointer returned. I either...
    See more | Go to post

  • How to get started with web server implementation

    Hello..

    Which language would be the best option, for implementing a simple web server? I've programmed a bit in C, C++, Java. I know basic PHP too.

    Thank you.
    See more | Go to post

  • hanaa
    replied to Difference between null and zero
    in C
    Got it. Thanks. :-)
    See more | Go to post

    Leave a comment:


  • hanaa
    replied to Difference between null and zero
    in C
    What does "encoding as 0" mean? Does it mean that the 0 is stored in the memory, in the place of the character that we are setting to null?...
    See more | Go to post

    Leave a comment:


  • hanaa
    started a topic Difference between null and zero
    in C

    Difference between null and zero

    Hello.

    Can I have an elaboration on the difference between null and zero.

    For example, we say we set a byte to null (using bzero() to null), how different is it from setting the bytes to zero?

    Also, I'd love to be directed to some source which is explicit about the difference. I googled but, found nothing good enough.

    Thanks :)
    Hanaa
    See more | Go to post

  • hanaa
    started a topic DJGPP - connect to database
    in C

    DJGPP - connect to database

    Hello

    Does anyone here use DJGPP compiler..

    I need to connect DJGPP C++ programs to MySQL database. What would I have to download..Is it MySQL connector for c++ ? I dont understand how to get it to working(add the necessary libraries to the compiler).
    My OS is windows XP.

    Thank you.

    Hanaa
    See more | Go to post

  • hanaa
    replied to Using stdio.h in a C++ program
    in C
    Oh I didnt know the .h thing. Strange. I always wrote <iostream.h> in Turbo c++ version 3.0. Yeah , but in GCC, it accepts only <iostream>.

    Hmmm. Okay. But I found nothing equivalent to setvbuf() (in stdio.h) in any other header file. Is there any, in a C++ header file?

    Thank you.
    See more | Go to post

    Leave a comment:


  • Thank you.
    I downloaded the GCC compiler.

    Also, are there no chances of a 16-bit compiler connecting to a database?, Say, if one adds the necessary libraries (is it even possible). I only wanna make sure that 16-bit compilers dont connect to databases, whatever change you make to them.. I have Borland's Turbo C++ version 3.0

    Thank you again.

    Hanaa
    See more | Go to post

    Leave a comment:


  • hanaa
    replied to Using stdio.h in a C++ program
    in C
    Thank you..
    1)Would you also tell me where I can find the Standards?

    2) Would someone answer the others questions too, the questions in my first post here (if using C's functions in C++ programs in a bad idea).
    See more | Go to post

    Leave a comment:


  • hanaa
    started a topic Using stdio.h in a C++ program
    in C

    Using stdio.h in a C++ program

    Hello..

    Is it okay to use functions such as setvbuf (that is defined in stdio.h) in a C++ program?
    I include stdio.h in the program and it works. Yet, I wonder if its okay.. stdio.h is a part of the standard C library and not standard C++ library, if I'm not wrong.
    I also want to know if many such other functions can be used in C++ programming. Is there a clear line between the standard libraries for C and C++? Is using...
    See more | Go to post

  • Is it true that 16-bit C compilers cannot connect to databases?

    Hello

    Is it true that 16-bit C compilers cannot connect to databases? I have Borland Turbo C++ version 3.0. Would I have to use a 32-bit compiler if i want to use a database for my application?
    Would someone also suggest some names of 32-bit compilers.

    Thanks.
    Hanaa.
    See more | Go to post

  • The windows firewall has always been off. Is there anything that I must change in the apache configuration file?
    See more | Go to post

    Leave a comment:


  • Yes Okay... :) Thanks coolsti and pbmods.
    See more | Go to post

    Leave a comment:


  • Thanks a lot pbmods
    Encapsulating the mysql credentials means?...
    See more | Go to post

    Leave a comment:


  • Did you mean hard code it into the script, and use that to check against the user entry? That way, it'd be safe and not in a session.. Did I get that right?
    Something like the following?
    Code:
    if(isset($_POST['submit']))
    {
     if($_POST['id']=='username' && $_POST['pass']=='password')
        { //log him in
         mysql_connect('--', 'username', 'password');
         //
        }
     else
        {
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...