Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTabCtrl problem Pin
Ganesh_T5-Mar-06 18:17
Ganesh_T5-Mar-06 18:17 
Questionwhat's the use of this? Pin
not insane yet!5-Mar-06 17:48
not insane yet!5-Mar-06 17:48 
AnswerRe: what's the use of this? Pin
Nibu babu thomas5-Mar-06 18:12
Nibu babu thomas5-Mar-06 18:12 
AnswerRe: what's the use of this? Pin
Michael Dunn5-Mar-06 18:27
sitebuilderMichael Dunn5-Mar-06 18:27 
Questionto anyone who can explain further...thank you in advance Pin
not insane yet!5-Mar-06 17:25
not insane yet!5-Mar-06 17:25 
AnswerRe: to anyone who can explain further...thank you in advance Pin
Nibu babu thomas5-Mar-06 17:30
Nibu babu thomas5-Mar-06 17:30 
AnswerRe: to anyone who can explain further...thank you in advance Pin
Divyang Mithaiwala5-Mar-06 17:50
Divyang Mithaiwala5-Mar-06 17:50 
Questionproblem in a program code Pin
ashira khera5-Mar-06 17:16
ashira khera5-Mar-06 17:16 
hi everyone

I have a problem in this code. I have to write a program that reverses a given file that is it will start reading the first half of the file, and continue to read the second half and replacing it with the reversed first half. It will end the operation by going to the beginning of the file and filling the first half with the reversed second half
I am having problem with reversing the second half and filling it in the first half's position (the second part of the question)
following is what i have done till now
any help would be greatly appreciated!!
thanks for your time!


#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>


int main(){
int fh;
long pos; /* Position of file pointer */
char buffer[10];
char *d = new char[10];
char buffer1[10];
int a,b,end,middle,i,j,p,count,m;
fh = open("abf.txt", O_RDONLY,0);
/* Seek the beginning of the file: */
pos = lseek( fh, 0L, 0);
if( pos == -1L )
perror( "_lseek to beginning failed" );
else
printf( "Position for beginning of file seek = %ld\n", pos );
end = lseek( fh, 0L, 2 ); /*end of the file*/
if( end == -1L )
perror( "_lseek to end position failed" );
else
printf( "Position for end position seek = %ld\n", end );

middle = end/2;
printf("middle of the file is:%d\n",middle);
for(i=0;i
QuestionRe: problem in a program code Pin
David Crow6-Mar-06 3:06
David Crow6-Mar-06 3:06 
Answerhow to replace first half with reversed 2nd half Pin
ashira khera6-Mar-06 8:19
ashira khera6-Mar-06 8:19 
QuestionRe: how to replace first half with reversed 2nd half Pin
David Crow6-Mar-06 8:37
David Crow6-Mar-06 8:37 
QuestionProgram hangs when focused... Pin
the_augy5-Mar-06 15:27
the_augy5-Mar-06 15:27 
AnswerRe: Here's some more information Pin
the_augy5-Mar-06 21:46
the_augy5-Mar-06 21:46 
AnswerYour urgent query... Pin
BadJerry8-Jan-07 1:47
BadJerry8-Jan-07 1:47 
QuestionProgramming Tutor Pin
VegasMalone5-Mar-06 14:45
VegasMalone5-Mar-06 14:45 
AnswerRe: Programming Tutor Pin
John R. Shaw5-Mar-06 16:17
John R. Shaw5-Mar-06 16:17 
QuestionExtracting numbers from a year Pin
Titan905-Mar-06 13:05
Titan905-Mar-06 13:05 
AnswerRe: Extracting numbers from a year Pin
Michael Dunn5-Mar-06 13:22
sitebuilderMichael Dunn5-Mar-06 13:22 
AnswerRe: Extracting numbers from a year Pin
PJ Arends5-Mar-06 13:31
professionalPJ Arends5-Mar-06 13:31 
GeneralRe: Extracting numbers from a year Pin
Titan905-Mar-06 15:26
Titan905-Mar-06 15:26 
QuestionUsing .lib vs. .dll Pin
Eikthrynir5-Mar-06 12:12
Eikthrynir5-Mar-06 12:12 
AnswerRe: Using .lib vs. .dll Pin
Jörgen Sigvardsson5-Mar-06 12:44
Jörgen Sigvardsson5-Mar-06 12:44 
GeneralRe: Using .lib vs. .dll Pin
John R. Shaw5-Mar-06 16:08
John R. Shaw5-Mar-06 16:08 
AnswerRe: Using .lib vs. .dll Pin
Tim Smith5-Mar-06 14:05
Tim Smith5-Mar-06 14:05 
QuestionOpenGL MFC Pin
braveheartkenya5-Mar-06 11:14
braveheartkenya5-Mar-06 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.