473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

how to read notepad text file data using C++ programm?

Sir have saved some data in notepad like....

Expand|Select|Wrap|Line Numbers
  1. File = F:\Files\SWwork\My Assembly.SLDASM"
  2. "  Mates"
  3. "    Coincident1"
  4. ""
  5. "    Coincident1"
  6. "      Type         = 0"
  7. "      AlignFlag    = 1"
  8. "      CanBeFlipped = False"
  9. ""
  10. "      Component    = base-1"
  11. "      MateEntType  = 3"
  12. "      (x,y,z) = (-5.59639294977956, -1.5868100626617, 0.484842721213511)"
  13. "      (i,j,k)      = (0, 0, 1)"
  14. "      Radius 1     = 0"
  15. "      Radius 2     = 0"
  16. ""
  17. "    Coincident1"
  18. "      Type         = 0"
  19. "      AlignFlag    = 1"
  20. "      CanBeFlipped = False"
  21. ""
  22. "      Component    = cylinder-1"
  23. "      MateEntType  = 3"
  24. "      (x,y,z) = (-2.09639294977956, 0.663189937338302, 0.484842721213511)"
  25. "      (i,j,k)   = (-3.49798081433316E-49, 6.16297582203915E-33, -1)"
  26. "      Radius 1     = 0"
  27. "      Radius 2     = 0"

So, i need to read those data like base-1, cylinder-1, etc... and present them in matrics format like....

....... ...............base-1...........cylinder-1 .........

base-1................... 0..................1

cylinder-1................ 1................. 0

where 0 indicates no relation between them and 1 indicates some relation between them.....
can you kindly give me the C++ code for that......

thanks in advance
Sep 21 '09 #1
2 5627
Banfa
9,065 Expert Mod 8TB
No but if you wish to write it yourself we would be happy to help with any problems you encounter trying to get it working properly.
Sep 21 '09 #2
weaknessforcats
9,208 Expert Mod 8TB
Notepad writes a standard text file. You read the file one line at a time using something like cin.getline().

Of course you have to know the format of the data on that line inorder to parse it in the program.
Sep 21 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: aa | last post by:
I write to a text file, and when view the resulting file in Notepad, it shows "\t" as tabs correctly, but "\n" does not break the line. Instad it shows as a square. In Dreamweaver it shows OK....
0
by: Tom | last post by:
Hi folks, I need to read information from a file. That is not the problem, BUT another programm (I have no control about that programm) constantly writes more information into that specific...
4
by: Jesper | last post by:
How can I open a textfile from C# using notepad (or the user assigned application for this).
2
by: Ziver MALHASOGLU | last post by:
Hi, I produce a text file using my windows application written with c#. -- System.Text.Encoding encOutput=null; encOutput=System.Text.Encoding.UTF8; StreamWriter sw=new...
9
by: Sandy | last post by:
can mfc application, send text data to opened notepad file in desktop?(live transfer of data) . can anybody help
3
by: RN Das | last post by:
Hi expert, I have a small web application in C# and ASP.Net and I want to open a file in notepad when clicked on a linked button. Here is hander code when clicked on the link button. It can open...
7
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. It is greatly appreciated. I would like a command button in VB.Net 2002 to open a text file, then to allow text from a textbox on the current form...
0
by: lion | last post by:
I have in my programm three files: SCANNER.CPP,tst_scanner.cpp and scaner.h i need read and write from text file which is glopal. how i can do it? the strange things if i put all programm in one...
3
by: Learning.Net | last post by:
How to read a Unicode data saved as ASCII in notepad file as txt ? I tried using streamReader but it is not showing Unicode data. eg. using (StreamReader sr = new StreamReader(test.txt) {...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.