6 Topics

Member Avatar for
Member Avatar for Builder_1

what are the differences of string and cstring header files and how does the pre defined function of strcmp which is called string comparison works???? i know it gives 0 if string 1 = string 2 gives +ive and -ive if str1 is greater or less but it calculates that …

Member Avatar for Builder_1
0
7K
Member Avatar for Melly3

New to c++. I'm trying to figure out how to use strcmp with array's . I need to see if a array holds the word "hello". I can't get my code to work quite right. What is it missing? #include<iostream> #include<cctype> #include<cstring> using namespace std; int main() { char a[30]; …

Member Avatar for deceptikon
0
248
Member Avatar for DaveyMoyes

Hi everyone, I have been using strcmp in a website I am helping with, we use this to check against passwords when a user is resetting thier password. The problem I have at the moment is, when ever i try to use the strcmp to check against numbers It always …

Member Avatar for broj1
0
143
Member Avatar for jakizak

Hi everyone, Having difficulty comparing two strings (Inside variables) in php. I have tried several methods, one being strcmp but I think I was doing that incorrectly, and now the simple [B]===[/B] / [B]==[/B] comparison methods. Here is the code: [CODE] <?php if ($pubinfo_username === $currentuser) { echo "<img alt=\"Remove …

Member Avatar for diafol
0
171
Member Avatar for Dec28

Not sure why my comparisons aren't working between my input (text) and my several char arrays. I'm trying to get the user's input to terminate certain functions as you'll see below. I realise it's not the most efficient code but if there's anything obvious I'm missing please let me know. …

Member Avatar for Narue
0
207
Member Avatar for SpyrosMet

Hey everyone. I have a problem with 2 strings i need to compare. My code is the following [CODE] if((*(fixedparkpnt)).name == pname) { //do stuff }[/CODE] I am trying to make a search proceedure based on a name given by the user but the condition is always false. I have …

Member Avatar for Agnusmaximus
0
1K

The End.