Showing results 1 to 22 of 22
Search took 0.01 seconds.
Posts Made By: iansane
Forum: C++ Aug 10th, 2008
Replies: 5
Views: 912
Posted By iansane
Re: how to execute other app, script, or system commands from c++?

Well I'm trying to learn all methods available for executing directly from a program I write in c++. I was just mentioning the VB way because I'm looking for something similar in c++.

The VB...
Forum: C++ Aug 10th, 2008
Replies: 5
Views: 912
Posted By iansane
Re: how to execute other app, script, or system commands from c++?

Thank you williamhemswort. My internet has been down so I couldn't be online for a while.

I can definitely start there. I'll have to figure out how to translate that into running apps on linux which...
Forum: C++ Aug 9th, 2008
Replies: 5
Views: 912
Posted By iansane
how to execute other app, script, or system commands from c++?

Hi, I've been looking around for how to execute another application from a c++ app.

I remember in VB I could have my app launch the browser or other app and could even have it launch command line...
Forum: C++ Jul 2nd, 2008
Replies: 12
Views: 757
Posted By iansane
Re: help reading binary into a vector for manipulation?

Thanks Ancient Dragon. I got some advice on how to display the decimal representation.
for(size_t i=0;i<memblock.size();++i) std::cout << int(memblock[i]) << std::endl;


Turns out the binary is...
Forum: C++ Jul 2nd, 2008
Replies: 12
Views: 757
Posted By iansane
Re: help reading binary into a vector for manipulation?

I feel like a dummy. That part with "iter ==" was a common mistake in c++ class that I usually spotted and corrected in other peoples code. Thanks for pointing it out.

It works now but I thought I...
Forum: C++ Jul 2nd, 2008
Replies: 12
Views: 757
Posted By iansane
Re: help reading binary into a vector for manipulation?

why did unsigned not work and what about the &?

It still gives "error...program has to close" unless I put the ios::ate back in. For some reason, that makes it stay open, but it's not printing out...
Forum: C++ Jul 2nd, 2008
Replies: 12
Views: 757
Posted By iansane
Re: help reading binary into a vector for manipulation?

Ok I simplified the whole thing. Now I have an error for "while (file.get(&byt)".

error: 16 X:\testingBinaryFileRead\newBinaryRead.cpp no matching function for call to `std::basic_ifstream<char,...
Forum: C++ Jul 1st, 2008
Replies: 12
Views: 757
Posted By iansane
Re: help reading binary into a vector for manipulation?

Any good books specifically for this topic?

When you say "while (in.get(&byt);
is "in" the name of the file stream?
So I just need to open a fstream called "in" or whatever and use it that way to...
Forum: C++ Jul 1st, 2008
Replies: 12
Views: 757
Posted By iansane
help reading binary into a vector for manipulation?

Hi, I am trying to learn how to read the binary of a file, such as a jpg. I got something going here but at run time in windows it says there is an error and the file must close.

I'm not even sure...
Forum: C++ Jun 7th, 2008
Replies: 4
Views: 708
Posted By iansane
Re: specify line of file to start reading?

I tried this and it is counting and skipping the first two lines but now the second "while" is not using commas as a delimeter. It's reading them into the vector. How can I delimit with '\n' and then...
Forum: C++ Jun 7th, 2008
Replies: 4
Views: 708
Posted By iansane
Re: specify line of file to start reading?

sorry, I don't know anything about flags or how to use a boolean to check if the line already exists.

I'm not sure how to check for headers. There's nothing special about them. I just added lines...
Forum: C++ Jun 7th, 2008
Replies: 4
Views: 708
Posted By iansane
specify line of file to start reading?

Hi, I have a readFile() function that reads a csv file into a vector.

The first two lines of the csv are collum headings.

After reading and displaying the file on screen, replacing ","'s with...
Forum: C++ May 27th, 2008
Replies: 16
Views: 14,106
Posted By iansane
Re: How do I flush the input stream?

I can not find unistd.h anywhere on my system.

So let me see if I understand this.

POSIX is the linux API just like there's a Windows API.

By changing pause to pause2, we have something that...
Forum: C++ May 26th, 2008
Replies: 16
Views: 14,106
Posted By iansane
Re: How do I flush the input stream?

Thank you John A and Narue.

I never would have thought of something like that since I'm a noob. I don't know enough to decide between windows, linux and the different compilers who is complying with...
Forum: C++ May 26th, 2008
Replies: 16
Views: 14,106
Posted By iansane
Re: How do I flush the input stream?

looks like Naure covered a lot of bases with one class of functions which is great.

I appreciate your comedy ruotine Traicey, but if there is an easier way to be able to flush,empty,ignore (what...
Forum: C++ May 25th, 2008
Replies: 7
Views: 1,590
Posted By iansane
Re: get user input for file name to open?

OK thanks a lot Duoas :-)

I was able to incorporate using a vector and am working on adding in a string stream now so I can parse it twice for the purpose of reading and writing csv files from user...
Forum: C++ May 25th, 2008
Replies: 7
Views: 1,590
Posted By iansane
Re: get user input for file name to open?

Thanks for the advise on safety. Can you tell me what is the deal with

int count = 10;
while (count > 0;

and
count--;

I know what they are but what is there purpose? Why count down from a number...
Forum: C++ May 24th, 2008
Replies: 7
Views: 1,590
Posted By iansane
Re: get user input for file name to open?

yeah sorry, I just figured that out.

Thanks :-)
Forum: C++ May 24th, 2008
Replies: 7
Views: 1,590
Posted By iansane
Re: get user input for file name to open?

sorry, comments didn't keep format when I posted.
Forum: C++ May 24th, 2008
Replies: 7
Views: 1,590
Posted By iansane
get user input for file name to open?

Hi, I am writing a program to read from a file.

I want to ask the user for the file name to open.

I have tried to use the basic open file code from cplusplus.com and it won't work unless I specify...
Forum: C++ May 23rd, 2008
Replies: 16
Views: 14,106
Posted By iansane
Re: How do I flush the input stream?

after looking up ambiguous, I'm wondering if this code could or should be rewritten so it can be called as a member function instead of as cin >> pause(). Don't know, just throwing the idea out...
Forum: C++ May 22nd, 2008
Replies: 16
Views: 14,106
Posted By iansane
Re: How do I flush the input stream?

works great for windows. I saved it as ignoreline.h and use it as an include.

Doesn't work in linux. Anyone know why?

Compile time error message:

clearTheStream.cpp: In function ‘int...
Showing results 1 to 22 of 22

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 8:20 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC