GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Computer programmers, help me (https://gfy.com/showthread.php?t=546519)

wedouglas 11-30-2005 05:30 PM

Computer programmers, help me
 
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 11-30-2005 05:44 PM

show the previous lines ? the one using strlen() ?

Baker Rd 11-30-2005 05:44 PM

"no matching function"

answers your question, no?

Pete-KT 11-30-2005 05:45 PM

your calling a function that you have declared

wedouglas 11-30-2005 05:48 PM

I have this

struct stats{
string name;
int cost;
};

stats blah[2];

how can i find the length of blah[0].name ?

Pete-KT 11-30-2005 05:50 PM

where are you declaring blah?

wedouglas 11-30-2005 05:51 PM

that is irrelevant. consider it in main.

Pete-KT 11-30-2005 05:58 PM

whats on line 40?

wedouglas 11-30-2005 06:05 PM

just part of a conditional statement. I just need to know the function to get the length of a string.

Baker Rd 11-30-2005 06:12 PM

its probably string.length or string.len (ie: length(string))

Brujah 11-30-2005 06:28 PM

I think it's just being used incorrectly. Maybe this will help.
http://www.programmingforums.org/for...ad.php?p=43453

wedouglas 11-30-2005 06: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.


All times are GMT -7. The time now is 05:07 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123