commands in c++

33tfrf34
Last edited on
http://www.cplusplus.com/reference/string/string/c_str/

http://en.wikipedia.org/wiki/Sizeof

http://www.cplusplus.com/reference/clibrary/cstdlib/free/

http://www.cplusplus.com/reference/clibrary/cstdlib/system/

http://www.cplusplus.com/reference/clibrary/cstdio/fflush/

http://www.cplusplus.com/reference/clibrary/cstdio/getchar/


haha that is all i could find on this website. :)

but as you can see, most of the time, if you look on your local cplusplus website (www.cplusplus.com) you can find most of what you're looking for.

:D

hope it helps
999777hhh
Last edited on
closed account (j3bk4iN6)
theres also a language reference on the msdn accessed from help. But I took a look at the cplusplus reference and the syntax and reference material is really good.
Last edited on
5555555ff
Last edited on
c_str is a string function used to split a string array onto multiple lines.

Ex. Let's say my string says: Hello, Everyone! I'm Tyler!
Then is you used the string function c_str then it would say: Hello,
Everyone!
I'm
Tyler!

So as you see it starts a new line whenever it hits a space in the string.
c_str is a string function used to split a string array onto multiple lines.


Umm.. no. I don't know where you got that or why you think that, but that's not true at all.

c_str gives you a pointer to the string data. This is necessary for some functions which take const char* for parameters and not strings.

For example, the ifstream class. If you want to open a file:

1
2
3
4
5
6
7
8
9
10
11
ifstream myfile("myfile.txt");

//
//  but what if you have a string:

string filename = "myfile.txt";
ifstream foo( filename );  // ERROR - doesn't work because
   // ifstream takes a const char*, not a string

// therefore you do this instead:
ifstream foo( filename.c_str() );
closed account (S6k9GNh0)
I'm 99% sure this is off some homework assignment, we've had three topics + more if I'm not mistaken almost identical to this.

I will note however that bFound is not related to C++ in anyway. It does however use a name scheme. The prefix of the word Found is b, which more often than not, means that the data type of a variable that contains the prefix is a boolean. "Found", more often than not, means you've found something that you've been iterating for but it could mean a number of other things so there is no way to tell.

Please note: Refrain from posting homework assignments unless something does not make sense. If the answer is easily findable, most of us will refrain from helping you. We are here to help you with a problem, not solve the problem for you necessarily. The only reason I posted about bFound was simply because I felt it's not something that can always easily relate to C++. Although I might be wrong since this was probably in your curriculum.
Last edited on
32342fsfd
Last edited on
[citation needed]
???
I can't find any reference on bfound, so I'm guessing it's some obscure MS library. Definitely not part of C++ standard.

http://social.msdn.microsoft.com/Forums/en/clr/thread/3288b3fd-021b-43ac-b90e-5fc2226e60a0

http://social.msdn.microsoft.com/Search/en-US?query=bfound&ac=8
Last edited on
closed account (S6k9GNh0)
I explained this, why are we needing to continue on about bFound?
because he's still asking....
Topic archived. No new replies allowed.