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...
User Profile
Collapse
-
-
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);
...Leave a comment:
-
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...Leave a comment:
-
oopsie,
Confused!! i think that is what my code do...
Regards,
ShaggY@FtF...Leave a comment:
-
[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:
You are using f_enter_names_a ges function to read your frnds age and name. After...Leave a comment:
-
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..
...Leave a comment:
-
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...Leave a comment:
-
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...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@...Leave a comment:
-
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...Leave a comment:
-
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...Leave a comment:
-
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@FtFLeave a comment:
-
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;...Leave a comment:
-
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...Leave a comment:
No activity results to display
Show More
Leave a comment: