I am working on a program to help make a small "dictionary" for our robot project ( see Practice Speaking English for more detail ).
The purpose for this small program is read in a word and its...
Type: Posts; User: tx1988
I am working on a program to help make a small "dictionary" for our robot project ( see Practice Speaking English for more detail ).
The purpose for this small program is read in a word and its...
Oh, thank you Cpro. I just tried but it still never output the meaning-----I mean the sentence. SO I am just wondering whether I can output a sentence by getline or just do somethng else, like read...
Yes, the test display in cout is same. I just replace
while (!input.eof())
{
input.getline(meaning, 200, '.');
cout<<meaning<<endl;
}
Well, thx Daved, I just changed as what you told me but it seems there're still problems.
This is the new output:
You can see it is as same as the previous one. I wonder if there's any problems...
I am working on a program to help make a small "dictionary" for our robot project ( see Practice Speaking English for more detail ).
The purpose for this small program is read in a word and its...
I know absolutely I am a noob in C++, and much worse thing happened: My professor can't finish our book in time, so he rushed the last chapters. For linked list, I can know the basics from the book...
Read a list of ints into a array.The output is two-column list,first column is a list of the different
array elements ;second column is the count of that element occurs.We can assume that there...
I understand your meaning,and also I had thought of those,but it is much easier to talk than to do.we go through your method:
how do you know where to stop?there maybe different numbers in the...
Write a program that merges the numbers in two files and writes all the numbers into a third file.Each input list contains a list of numbers of type int in sorted order from the smallest to the...
SO,now You guys mean that I should continue working hared on the concepts or just simply know something about it.Because My professor told me to be a computer science major,we should be good at...
and also for this :
we know 0111 1111 is 127,how about 0111 1111+1 if the variable is char(which is -128~127)?
so because it is 1000 0000 after +1,so 1 is use for sign(-),why the answer is -128?...
My professor told me that the concepts is extremely important than programming.So today he shows us:
char c=0;
c=~c;(which is the bitwise)
so what is c=?
Since C is 00000000,and use not(~)...
I don't know how I could say because you are really a nice kind guy that willing to help the beginner like me.And in fact even I already finish CS 2(this course for C++,and luckily get an A) and...
thank yo Daved.I mean "perfectly" like if there is more than 10 test scores(any number beyond
10 and you don't know the number of test,which means you can't use score[0]~score[9],of course not...
Thanks to Daved and matsp because of their really careful and patient explain.
for Salem
Your words make me little frustrated,but I know your meaning and that is what I want to do.However,I...
And also I still can't understand why the last person do 2 times.
I know eof will read one more value character to determine whether it is true or false.So in my case,after read the last score[9]...
are you sure I can use this?I think it means select the whole contents.And I tried and failed.This is not the magic key!
while(...
and also can someone tell me what is the key to modify the input file to make the system know the real end?
I am sorry,what is "kurt" ?and what do you mean by "read the file line by line and ignore blank lines"?
My teacher help me for solving this silly question.This is my list file:
Tian 98 99 100 99 97 96 99 99 100 99
Paul 88 89 90 91 94 93 88 78 99 100
Zerg 99 91 92 78 99 95 94 96 99 100
Mengle 99...
Yes,I know your way,but for this case there is a mixed type--char and int.how could I define the value?
Write a program to compute numeric grades for a course.Read in a data file which contains the first name of the student and then ten quiz scores in each line.Then compute the ave score for the ten...
I have a crazy idea:Can I add two streams?I mean like stream3=stream1+stream2;so I merge them into a same stream,then sort.
so you mean each time read in to the two lists one number for each list,then compare this two number and write the smaller one to the third array,but how about the lager one?compare it to the next...
Read from two file,each file has a list of integers.You must merge them in to a new file(list),and
sort them from smallest to largest.
I think I need to read these two lists into two arrays from...