[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



string truncPath(string name){
    if(name.substr(1, 1) == ":"){
        for(int k=0; k < 30; k++){
            if(name.substr(name.length()-k, 1) == "\\"){
                string ret = name.substr(name.length()-k+1, k);
                return ret;
            }
        }
    }

    else{
        return name;
    }
}

Saying "Not all control paths return a value" - what does this mean, am 
I missing something in my code?

-Jay


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="01282" href="msg01282.html">[ale] C++ &quot;not all control paths return a value&quot;</a></strong>
<ul><li><em>From:</em> scherrey at proteus-tech.com (Benjamin Scherrey)</li></ul></li>
<li><strong><a name="01283" href="msg01283.html">[ale] C++ &quot;not all control paths return a value&quot;</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
<li><strong><a name="01284" href="msg01284.html">[ale] C++ &quot;not all control paths return a value&quot;</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
<li><strong><a name="01293" href="msg01293.html">[ale] C++ &quot;not all control paths return a value&quot;</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg01280.html">[ale] mod_perl + Apache</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg01282.html">[ale] C++ &quot;not all control paths return a value&quot;</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg01280.html">[ale] mod_perl + Apache</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg01282.html">[ale] C++ &quot;not all control paths return a value&quot;</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#01281"><strong>Date</strong></a></li>
<li><a href="threads.html#01281"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>