Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,194 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,343 people online right now. Registration is fast and FREE... Join Now!




VB and C using same file

 
Reply to this topicStart new topic

VB and C using same file, a common file used by C and Program

deelovme
9 Jul, 2008 - 06:05 AM
Post #1

New D.I.C Head
*

Joined: 8 Jul, 2008
Posts: 3

sir, im creating an program in which im generating a file using VB, file is a random file and im using record in it to write data. not an c application code is needed which can read that file through structure. i m not been able to read that file using srtings help me.
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: VB And C Using Same File
9 Jul, 2008 - 06:08 AM
Post #2

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,556



Thanked: 99 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
I don't understand the question. Are you using C or VB?
User is offlineProfile CardPM
+Quote Post

Cerolobo
RE: VB And C Using Same File
9 Jul, 2008 - 06:24 AM
Post #3

D.I.C Regular
Group Icon

Joined: 5 Apr, 2008
Posts: 440



Thanked: 31 times
My Contributions
Ok, from what I understand, you created a file in VB, and filled it with data. Now, you want a C program to read that file, and do something with the data.

If that is the case, you'll have to look into things like
fopen() - To open the file to read from
fread() - To read from the file
atoi() - Convert C strings to integers
atof() - Convert C strings to floats
fclose() - To close the file when you are done.

As for the actual parsing of the data, that highly depends on the syntax of your file format. Thus, I can't really go into the specifics.
User is offlineProfile CardPM
+Quote Post

deelovme
RE: VB And C Using Same File
10 Jul, 2008 - 09:00 AM
Post #4

New D.I.C Head
*

Joined: 8 Jul, 2008
Posts: 3

QUOTE(Cerolobo @ 9 Jul, 2008 - 07:24 AM) *

Ok, from what I understand, you created a file in VB, and filled it with data. Now, you want a C program to read that file, and do something with the data.

If that is the case, you'll have to look into things like
fopen() - To open the file to read from
fread() - To read from the file
atoi() - Convert C strings to integers
atof() - Convert C strings to floats
fclose() - To close the file when you are done.

As for the actual parsing of the data, that highly depends on the syntax of your file format. Thus, I can't really go into the specifics.

thanyou sir for that comment.....but actually im not been able to code it properly if you can provide me the codes i will be very thankful to u.........

User is offlineProfile CardPM
+Quote Post

deelovme
RE: VB And C Using Same File
10 Jul, 2008 - 09:05 AM
Post #5

New D.I.C Head
*

Joined: 8 Jul, 2008
Posts: 3

QUOTE(gabehabe @ 9 Jul, 2008 - 07:08 AM) *

I don't understand the question. Are you using C or VB?

sir im using VB to write data into a file and trying to read it from a c program.....now i had modified it. im using a VB program to write a sequencial file and then reading it with a c program. now im getting the data as string for eg data is: "1 NDLS KLKT 3737 PRNCHL SUPFST 2 2314.68 7/7/2008" now im lookig to divide this string into smaller strings like "1", "NDLS", "KLKT", "3737" and so on.......can u help me in this
User is offlineProfile CardPM
+Quote Post

tody4me
RE: VB And C Using Same File
10 Jul, 2008 - 09:27 AM
Post #6

Only Jenny Craig makes thin clients...
Group Icon

Joined: 12 Apr, 2006
Posts: 1,278



Thanked: 3 times
Dream Kudos: 100
My Contributions
For complete solutions, check out the website Here and these people should be able to write the entire code for you and give it to you. Just check it out, I've used it many times to help when I'm stuck.

HTH

This post has been edited by tody4me: 10 Jul, 2008 - 09:27 AM
User is online!Profile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 12:07PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month