Search Results

Showing results 1 to 34 of 34
Search took 0.01 seconds.
Search: Posts Made By: k2k ; Forum: C++ and child forums
Forum: C++ Apr 17th, 2008
Replies: 0
Views: 364
Posted By k2k
Can anyone point out what is wrong with this function?

suppose I have a linklist which has already been populated with 100 nodes containing objects and linking from one to another. The object...
Forum: C++ Apr 2nd, 2008
Replies: 1
Views: 1,078
Posted By k2k
I have three child classes which 2 of them work and the last one has the "not a base or memeber error" can anyone tell what went wrong? please see the last file at the bottom



# include...
Forum: C++ Apr 1st, 2008
Replies: 2
Views: 432
Posted By k2k
can anyone please point out what's wrong with the files linking?

i have this compiling errors:


1>c:\documents and settings\lih\my documents\visual studio...
Forum: C++ Mar 25th, 2008
Replies: 0
Views: 320
Posted By k2k
can anyone please point out what is wrong with my seeForward function? My program run fine with the option 2 ... however,, seeforward isn't working .... thx



# include "Name.h"

struct...
Forum: C++ Mar 20th, 2008
Replies: 1
Views: 407
Posted By k2k
I followed the book to finish this 2 node linked list, and however it looks like there is only one node in it. (temp has replaced the head???? my book example coded this way which i don't fully...
Forum: C++ Feb 17th, 2008
Replies: 2
Views: 6,319
Posted By k2k
Does anybody know what class function is for checking if a string has any letter in upper case?

string FirstName_LastName

any function return the idex of char[] that is upper case ? thank you
Forum: C++ Feb 16th, 2008
Replies: 4
Views: 2,964
Posted By k2k
First of all, to VernonDozier, I had to use the find() and replace() coz my professor wants us to. But thx, a lotz for replying.

And now, I have a kind of second version using find() and...
Forum: C++ Feb 16th, 2008
Replies: 4
Views: 2,964
Posted By k2k
My program should find any 4 letter words and change them into string "love" ... i have successfully found all the spaces and modified any 4 letter words before the spaces... however, the last word...
Forum: C++ Feb 13th, 2008
Replies: 2
Views: 780
Posted By k2k
I need to let the user input a line of words and make all the 4 letter words in the sentence "love"....

example:
cin>> I hate programming

output --> I love programming


does anybody...
Forum: C++ Feb 5th, 2008
Replies: 1
Views: 598
Posted By k2k
I am trying to search an array of object, for example lastName, a private variable of the object, however, the array might have more than one same last name from different objects.. i need to output...
Forum: C++ Jan 31st, 2008
Replies: 1
Views: 931
Posted By k2k
Does anyone know how to delete a specific index of an array? Is there any recommended library out there ?
Forum: C++ Jan 29th, 2008
Replies: 1
Views: 1,081
Posted By k2k
sorry for creating the same post,, but i forgot the thing...

hi, i am trying to let the user create a file name and past it to the ofstream writer.open()
I am trying to keep asking for char...
Forum: C++ Jan 29th, 2008
Replies: 1
Views: 473
Posted By k2k
hi, i am trying to let the user create a file name and past it to the ofstream writer.open()
I am trying to keep asking for char until the user hit the enter key then fileName will be complete even...
Forum: C++ Jan 28th, 2008
Replies: 2
Views: 2,920
Posted By k2k
Can anyone tell what cause the run time "Debug Assertion Failed!" error message? it has expression: sizeInBytes>count




int main()
{
int choice; // for menu choice
string...
Forum: C++ Jan 26th, 2008
Replies: 1
Views: 626
Posted By k2k
hi,
I am trying delete an old txt file and rename the new modified txt file... i followed everything from the example. However, i can't successfully rename the file. deletion is ok though. thank...
Forum: C++ Jan 26th, 2008
Replies: 4
Views: 1,327
Posted By k2k
using the get function was actually my initial attempt,,, however since lastName and firstName are string""" ..... i can't have a simple get function like id as below

int Name:: getID()
{
...
Forum: C++ Jan 25th, 2008
Replies: 4
Views: 1,327
Posted By k2k
hi,
My program created an object array containing 271 objects from the "names.txt", and each object has 3 private class variables, "id lastname and firstname "...... i know i can't use ofstream...
Forum: C++ Jan 20th, 2008
Replies: 5
Views: 5,463
Posted By k2k
I tried different attempt to fix the error, however, I couldn't correctly break a string down into a char array which fit in the isdigit() .... say if my text has "i have 322 apple" ... how do i read...
Forum: C++ Jan 20th, 2008
Replies: 5
Views: 5,463
Posted By k2k
still anything wrong with my code?



# include <iostream>
# include <fstream>
# include <cctype>
# include <string>

using namespace std;
Forum: C++ Jan 20th, 2008
Replies: 5
Views: 5,463
Posted By k2k
Anybody please show how to convert a string, for example in a text doc, to an int... and then maybe add 1 and show total output.

text.doc could simply contain

I have 3 apple.


output:

4
Forum: C++ Jan 19th, 2008
Replies: 8
Views: 2,548
Posted By k2k
yes, i can manually delete or rename the text doc. function remove() is my problem. Thank you




/*
*C++ review lab_1
*/
# include <iostream>
# include <string>
Forum: C++ Jan 19th, 2008
Replies: 8
Views: 2,548
Posted By k2k
thx for everybody's great help. I have successfully got all the lines i need written into a new file. And I figured out the correct syntax to remove and rename... however,,, last step, it is...
Forum: C++ Jan 19th, 2008
Replies: 8
Views: 2,548
Posted By k2k
is it possible to show how to delete the old file and rename the new file? what class should I use to do this? thank you
Forum: C++ Jan 18th, 2008
Replies: 8
Views: 2,548
Posted By k2k
hi,
Would anyone show how to delete a specific line from a txt file? Is there a member function from the ios class? thank you.
Forum: C++ Jan 18th, 2008
Replies: 6
Views: 881
Posted By k2k
god, i thought i would never make this kind of bug again....... thx so much
Forum: C++ Jan 18th, 2008
Replies: 6
Views: 881
Posted By k2k
sorry,, it is actually a built error. however, does my program's syntax structure fine? This is my first time combining class function and regular function.

1>------ Build started: Project: lab1,...
Forum: C++ Jan 18th, 2008
Replies: 6
Views: 881
Posted By k2k
Can I have regular function and class function together? if so, where should i place the regular function declaration? The compiler wouldn't compile this one... the problem is function showlist() ...
Forum: C++ Jan 17th, 2008
Replies: 2
Views: 461
Posted By k2k
twomers,
hey, thx alot. I forgot the basic basic..... i appreciate your great help. thank you
Forum: C++ Jan 17th, 2008
Replies: 3
Views: 548
Posted By k2k
First of all, i hope the thing is what i was asked to do to encase the my code.

And please help on the set() function. I don't know why the string type in the parenthesis gave me compile error...
Forum: C++ Jan 17th, 2008
Replies: 2
Views: 461
Posted By k2k
Anyone please take a look at the set() ... i don't know what went wrong that string in the set() gave me compile error saying undeclared identifier, which shouldn't even be a variable


#...
Forum: C++ Jan 16th, 2008
Replies: 3
Views: 1,279
Posted By k2k
the array size, i, is supposed to be 271.. i set x = i-1 //270, the last index for cout...... and then i-- ,,,, up to 0....... i don't know why it doesn't read or display from the beginning of the...
Forum: C++ Jan 16th, 2008
Replies: 3
Views: 1,279
Posted By k2k
hi,
i have a txt file "names" containing 300 set of personal info such as:

3765 // id
thomas //last name
barry // first name
876-988776 //phone number
16.37 // a price...
Forum: C++ Dec 8th, 2007
Replies: 3
Views: 1,435
Posted By k2k
thx for the reply... but how this program is supposed to work? what should i input to get my text document?

istream& reader = cin; what does this line do? please provide a bit common on the...
Forum: C++ Dec 6th, 2007
Replies: 3
Views: 1,435
Posted By k2k
hi all,
I am trying to figure out how to read from a file, ifstream reader reading string next.... if next is a digit then add it to total... and cout total.. please indicate what went wrong....
Showing results 1 to 34 of 34

 


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

©2003 - 2009 DaniWeb® LLC