Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Forums
Blogs
Articles
Groups
Galleries
Member List
Calendar
Home
Forum
Simply Business
Fucking Around & Business Discussion
Computer programmers, help me
Computer programmers, help me
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
wedouglas
So Fucking Banned
Join Date:
Aug 2004
Posts:
5921
Share
Post
#1
Computer programmers, help me
11-30-2005, 03:30 PM
40 C:\Documents and Settings\william\Desktop\ECE370\ass5\main.cpp no matching function for call to `strlen(std::string&)'
wtf is this?
I have #include <string.h>
Brujah
Beer Money Baron
Join Date:
Jan 2001
Posts:
22157
Share
Post
#2
11-30-2005, 03:44 PM
show the previous lines ? the one using strlen() ?
Free Premium Domain Lists and Tools at
Clickmojo.com
For Sale:
Obscenity.com
Comment
Post
Cancel
Baker Rd
Confirmed User
Join Date:
Nov 2005
Posts:
647
Share
Post
#3
11-30-2005, 03:44 PM
"no matching function"
answers your question, no?
money talks and bullshit walks.
Comment
Post
Cancel
Pete-KT
Workin With The Devil
Join Date:
Oct 2004
Posts:
51532
Share
Post
#4
11-30-2005, 03:45 PM
your calling a function that you have declared
Comment
Post
Cancel
wedouglas
So Fucking Banned
Join Date:
Aug 2004
Posts:
5921
Share
Post
#5
11-30-2005, 03:48 PM
I have this
struct stats{
string name;
int cost;
};
stats blah[2];
how can i find the length of blah[0].name ?
Comment
Post
Cancel
Pete-KT
Workin With The Devil
Join Date:
Oct 2004
Posts:
51532
Share
Post
#6
11-30-2005, 03:50 PM
where are you declaring blah?
Comment
Post
Cancel
wedouglas
So Fucking Banned
Join Date:
Aug 2004
Posts:
5921
Share
Post
#7
11-30-2005, 03:51 PM
that is irrelevant. consider it in main.
Comment
Post
Cancel
Pete-KT
Workin With The Devil
Join Date:
Oct 2004
Posts:
51532
Share
Post
#8
11-30-2005, 03:58 PM
whats on line 40?
Comment
Post
Cancel
wedouglas
So Fucking Banned
Join Date:
Aug 2004
Posts:
5921
Share
Post
#9
11-30-2005, 04:05 PM
just part of a conditional statement. I just need to know the function to get the length of a string.
Comment
Post
Cancel
Baker Rd
Confirmed User
Join Date:
Nov 2005
Posts:
647
Share
Post
#10
11-30-2005, 04:12 PM
its probably string.length or string.len (ie: length(string))
Last edited by
Baker Rd
;
11-30-2005, 04:15 PM
.
money talks and bullshit walks.
Comment
Post
Cancel
Brujah
Beer Money Baron
Join Date:
Jan 2001
Posts:
22157
Share
Post
#11
11-30-2005, 04:28 PM
I think it's just being used incorrectly. Maybe this will help.
http://www.programmingforums.org/for...ad.php?p=43453
Free Premium Domain Lists and Tools at
Clickmojo.com
For Sale:
Obscenity.com
Comment
Post
Cancel
wedouglas
So Fucking Banned
Join Date:
Aug 2004
Posts:
5921
Share
Post
#12
11-30-2005, 04:53 PM
Thanks i found it. I saw it written online as length() and thought i used it like length(blah[0].name)
when it is actually supposed to be blah[0].name.length()
thanks for looking.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment