User Profile

Collapse

Profile Sidebar

Collapse
svsandeep
svsandeep
Last Activity: Nov 5 '07, 05:49 AM
Joined: Nov 22 '06
Location: Hyderabad India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • svsandeep
    replied to Obtaining a Compilation Datestamp
    in C
    Hmm,

    As far as i know there is no function in C to get this information. But dont you think this time stamp would be the time stamp at which the C executable was modified.. If it is may be your problem can narrow down to knowing a DOS command which will give us the time at which the executable file was last modified. Which inturn can be used in system function using C.

    Regards,
    ShaggY@FtF...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to text files
    in C
    http://www.thescripts. com/forum/thread576670.ht ml
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to Problem Updating An 2D Array
    in C
    Hi,

    I some how don't want to do any thing in C++. Dont know if the below C code is going to help you or not just give it a try..

    #include<stdio. h>
    void main()
    {
    int i,j,a[10][10],num;
    FILE *f1;
    f1 = fopen("c:/input.txt","r") ;
    for(i=0;i<=9;i+ +)
    for(j=0;j<=9;j+ +)
    {
    fscanf(f1,"%d", &num);
    ...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to cant find the problem with my text file
    in C
    this part is not working properly either and I am unable to spot what is wrong with it.
    so if someone can help me that would be great.[/QUOTE]

    Dude,

    Here is the corrected code. Please go thro. I dont want to (too lazy to) tell where i did the changes.. you will find them anyways :)


    #include <iostream>
    #include <fstream>
    #include <stdio.h>
    using namespace...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to C Problem
    in C
    oopsie,

    Confused!! i think that is what my code do...

    Regards,
    ShaggY@FtF...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to Reading file into array problems
    in C
    [QUOTE=chris237]I'm having trouble with the following program. i want it to have the options to save a list of data entered by the user and display it the next time they run it. Could someone please either show me a sample program or tell me where i'm going wrong.

    i use DEV C++
    Written in C

    Code:
    
    
    Hi,

    You are using f_enter_names_a ges function to read your frnds age and name. After...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to C Problem
    in C
    Dude,

    Thx for the suggestion. Okie then we will do one thing, how about counting number of chr's the line (the line we are going to read) have? This can be easily done by using fgetc function and a silly counter. According to this number, then we can allocate the memory required and also move back the file pointer to the required position using some seek function. This way there will not be waste of so called resources..
    ...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to Looping and relational (if else) question
    in C
    Hi,

    From first look... this is what i found.

    Have a close look at this line in your program...

    scanf("%d",&dec ision);

    you are using %d???(It is used for integers) also "decision" is declared as a character which mean it wont be able to accommodate "YES"!!!!.

    Regards,
    ShaggY@FtF...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to Implementing genetic algorithm
    in C
    Hi,

    Two of my friends did a project related to genetic algorithms. Though it is entirely different topic, i thought may be it will help you. Atleast during your thesis preperation ;)
    http://www.svsandeep.4 t.com/oldsite46255/docs/madan_swaroop.p df

    Regards,
    ShaggY@FtF...
    See more | Go to post

    Leave a comment:


  • Dude,

    I think you want to delete a file completely from the hardisk if i am not wrong.

    i hope you know the path of the file. here is the example

    #include <stdlib.h>
    void main()
    {
    system("del c:\\delme.txt") ;
    }

    Now you can pass any command you want to run (directly or as a string) to the system function.

    Regards,
    ShaggY@...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to I cant find my longest word , please help
    in C
    Hi,

    Started reading your program and failed to understand why you are doing this..

    while(fscanf(fi le1,"%s",poem_w )!=EOF)
    {
    i ++;
    strcpy(poem_s,p oem_w);
    }
    word = i;

    I dont want to go any further with out knowing what exactly you want to do...with the above snippet of code.

    Anyways here is a small code i wrote which will find out the longest word...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to how to solve this problem
    in C
    Hmm,

    if you look at my post. I said "using system function in C "


    Please find below what a system command can do..

    Read the command you want to run in to a string variable and then pass the variable to system function....

    #include <stdlib.h>
    int system( const char *command );

    The system() function runs the given command as a system call. The...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to how to solve this problem
    in C
    Hmm,

    R u Expecting a solution with GUI for this. I dont get your question. Dont you think it can be easily done by using system() function in C. We can run all dos commands using it.

    Regards,
    ShaggY@FtF
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to C Problem
    in C
    Dude,

    #include <stdio.h>
    #include <stdlib.h>
    #include <iostream.h>

    //Global Declarations.
    struct iread
    {
    char c[];
    } *ptr;
    int getout=0;

    char* ReadRealyLongTe xtLine(FILE *p_fhInFile)
    {
    char ch;

    //used to get out of the program once EOF has reached

    if (getout == 1)
    return NULL;...
    See more | Go to post

    Leave a comment:


  • svsandeep
    replied to reading file
    in C
    Dude,

    For an integer, typical size is 4 bytes which means it can store as much as 4,294,967,296./* calculated as 2 power (8*4) */ This doesn't mean you can store from 0 to 4,294,967,296, instead you can store from -2147483648 to +2147483647.

    Now if you make a attempt to store 2147483648 in your program it will take as
    -2147483648 and for 2147483648 --> -2147483647 and so on..

    I hope this answered...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...