| | |
File issues in in C++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2008
Posts: 7
Reputation:
Solved Threads: 0
hi friends,
I am having a problem with IO operations in C++.
This is the path:
-----------------
C:\Symbian\9.1\S60_3rd_MR\Epoc32\winscw\c\system\Apps\test\
I am having 4 files say f1.txt (size 400 KB)
f2.txt (1 kb)
f3.txt (1 kb)
f4.txt (1 kb)
These four files reside in the following above given path.
The files in the program are opened in binary mode.
a) In the first case, I am reading the entire file (f1.txt)
in a loop (it contains say 10000 records) i.e there are 10000 read operations
(*) After that if i try to open files [f2.txt,f2.txt and f4.txt]
it doesnt get opened even if they exists.
b) In the second case, I am not reading te entire file but just
1000 records i.e there are just 1000 read operations.
In this case all the files i.e [f2.txt,f3.txt,f4.txt] are created.
why is it that after 10000 read operations code doesnt work properly
and after 1000 operations it works properly.
Is there any limitation on the number of read operations or do i need any privilage for such extensive file operation.
In both the cases the program doesnt crash it exits normally.
I am in a reall fix. please do help me out.
Eagerly waiting for your reply.
Thanks,
himanshu k.
Symbian Application Developer
I am having a problem with IO operations in C++.
This is the path:
-----------------
C:\Symbian\9.1\S60_3rd_MR\Epoc32\winscw\c\system\Apps\test\
I am having 4 files say f1.txt (size 400 KB)
f2.txt (1 kb)
f3.txt (1 kb)
f4.txt (1 kb)
These four files reside in the following above given path.
The files in the program are opened in binary mode.
a) In the first case, I am reading the entire file (f1.txt)
in a loop (it contains say 10000 records) i.e there are 10000 read operations
(*) After that if i try to open files [f2.txt,f2.txt and f4.txt]
it doesnt get opened even if they exists.
b) In the second case, I am not reading te entire file but just
1000 records i.e there are just 1000 read operations.
In this case all the files i.e [f2.txt,f3.txt,f4.txt] are created.
why is it that after 10000 read operations code doesnt work properly
and after 1000 operations it works properly.
Is there any limitation on the number of read operations or do i need any privilage for such extensive file operation.
In both the cases the program doesnt crash it exits normally.
I am in a reall fix. please do help me out.
Eagerly waiting for your reply.
Thanks,
himanshu k.
Symbian Application Developer
We need to see actual code. I suspect the problem is actually somewhere else in your program, quite possibly trashing memory somewhere during the first file read operation, or failing to delete memory when necessary making your program gobble up all the computers resources.
Look at Task Manager while your program is running and see if the memory used by your program or other resources keeps increasing.
Look at Task Manager while your program is running and see if the memory used by your program or other resources keeps increasing.
Last edited by Ancient Dragon; Jul 3rd, 2008 at 9:16 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- home work help funcations and arry issues (C)
- ASP.NET and Mozilla - Issues! (ASP.NET)
- Worm virus - XP issues (Viruses, Spyware and other Nasties)
- Having issues... fntldr.exe, WIN.INI BAH!!! (Windows 95 / 98 / Me)
- file sharing (Windows NT / 2000 / XP)
- File Sharing and such (Networking Hardware Configuration)
- driver issues (Monitors, Displays and Video Cards)
Other Threads in the C++ Forum
- Previous Thread: Windows GUI book.
- Next Thread: Array of file handles
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game generator getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






