Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Loading video...
Text Comments (7)

1 answer

Last reply by: Alvin Sylvain
Tue Jul 1, 2014 12:34 AM

Post by Kitt Parker on June 30 at 08:10:41 PM

Good Evening,
I hope that you are able to provide some insight.  I'm currently working on a test program that will censor sensitive parts of a message.  Censor the entire sentence or ~~the line between two paragraphs identified by a zero character line~~  I seem to be unable to understand what this means,  how do I identify a zero character line? ><

2 answers

Last reply by: Kitt Parker
Thu Jun 12, 2014 8:11 AM

Post by Kitt Parker on June 11 at 03:23:44 PM

Question concerning command line parameters.  Hope that you are able to provide a bit of insight.

I can tell that the arguments after the first one are not being passed in.  I can tell because if I switch the order, the new "1" will display through cout when called.  If correct, there must be some simple way to have the arguments accepted as expected.


I have int main

int main (int argc, char** argv){

 ifstream testIn    (argv[2]);

 ifstream testIn2   (argv[1]);
 ofstream reportOut (argv[3]);

}

1 answer

Last reply by: Alvin Sylvain
Wed Feb 26, 2014 11:30 AM

Post by mohab ahmed on February 25 at 07:21:54 AM

I have a file and store array of structure  but the problem is I want to get data back in array of structure too but I don not know how to do this

Input/ Output (IO)

  • The simplest form of input and output for a C++ program uses what is known as Character Streams – where characters “stream” into or out of the program from/to some external source.
  • The objects we’ve used already, cin and cout, are external objects of classes inherited from “iostream” class.
  • Two additional objects are cerr and clog
  • “cin”, “cout”, “cerr” and “clog” are console streams. I/O is to the user terminal or console.
  • The stream classes include useful methods, such as “get()”, “put()”, “good()”, “eof()”, and others.
  • Streams can be formatted using I/O Manipulators
  • Formatting includes width, precision, scientific notation, etc.
  • Character streams can also connect from/to Files
  • The file stream classes include additional methods for file manipulation, such as “open()”, “close()”, “read()” and “write()”.
  • Here are links to more information about C++ input and output: http://www.cplusplus.com/doc/tutorial/basic_io/ http://www.cplusplus.com/doc/tutorial/files/

Input/ Output (IO)

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.