Search Results

Showing results 1 to 15 of 15
Search took 0.01 seconds.
Search: Posts Made By: dsuh06
Forum: C++ Dec 3rd, 2007
Replies: 4
Views: 664
Posted By dsuh06
thank you!!
Forum: C++ Dec 3rd, 2007
Replies: 4
Views: 664
Posted By dsuh06
for the for loop

for ( ; *source!='\0'; source++)

what is the purpose of the semicolon in the for loop ?

thank you!
Forum: C++ Dec 2nd, 2007
Replies: 2
Views: 437
Posted By dsuh06
thank you! this clarifies much confusion I was experiencing.
Forum: C++ Dec 2nd, 2007
Replies: 2
Views: 437
Posted By dsuh06
if " int*& ptr " is declared as a parameter of a function, what does it do?

for example:

findMax(int arr[], int n, int*& ptr)
Forum: C++ Nov 28th, 2007
Replies: 7
Views: 895
Posted By dsuh06
umm.. is it array[1] which is origially 3 set to 9?
Forum: C++ Nov 27th, 2007
Replies: 7
Views: 895
Posted By dsuh06
okies..

so this is what i thought:

ptr+= 2
increases the pointer by two.. so the ptr will now point to array[2]

and ptr[1] =9

the value of index 1 is equal to 9..
Forum: C++ Nov 27th, 2007
Replies: 7
Views: 895
Posted By dsuh06
wow thank you!

then in addition, what does

ptr+= 2
and ptr[1] =9

do?

thank you!!
Forum: C++ Nov 27th, 2007
Replies: 7
Views: 895
Posted By dsuh06
what does the following do?

int array[6] = { 5, 3, 4, 17, 22, 19 };

int* ptr = array[0]
*ptr = -1;
thank you!
Forum: C++ Nov 20th, 2007
Replies: 1
Views: 1,449
Posted By dsuh06
Hello, I am trying to "peek" the next character to see if it is a character. If the word exceeds the max linelength it should be written in the next line with the count starting from zero again.
...
Forum: C++ Nov 19th, 2007
Replies: 3
Views: 1,065
Posted By dsuh06
I'm trying to copy all the lines/character in a file into an array so that i can reformat the text. Thank you for your help!!!
Forum: C++ Nov 19th, 2007
Replies: 3
Views: 1,065
Posted By dsuh06
const int MAX=200;
char line[MAX];
char s2[MAX];

inf.getline(line,MAX);

for(;;)
{
for(int i=0; i < MAX ; i++)
{
Forum: C++ Nov 19th, 2007
Replies: 7
Views: 10,099
Posted By dsuh06
thank you so much!!!
Forum: C++ Nov 18th, 2007
Replies: 7
Views: 10,099
Posted By dsuh06
the code i have so far is:


int reformat(istream& inf, ostream& outf, int lineLength)
{
char newlines;
inf.get(newlines);
while (inf.get(newlines))
{
if (newlines != '\n')
Forum: C++ Nov 18th, 2007
Replies: 7
Views: 10,099
Posted By dsuh06
how can you exactly do that? thanks!
Forum: C++ Nov 18th, 2007
Replies: 7
Views: 10,099
Posted By dsuh06
I have a project where I need to reformat a plain text file.

for example,

Hello nice to meet
you.
Glad to be here.

will be reformatted to the following:
Showing results 1 to 15 of 15

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC