My professor gave it to us to use as a class. Ph.D from MIT. Pretty smart guy. I'm a little confused, he said it works for integer arrays but we need to modify it for c-style strings?
Type: Posts; User: Sammy2011
My professor gave it to us to use as a class. Ph.D from MIT. Pretty smart guy. I'm a little confused, he said it works for integer arrays but we need to modify it for c-style strings?
Here is code that works for integer arrays. Please offer guidance on how I can make it work for C-style strings.
//// strCompare.h ////
int strCompare(char a[], char b[]);
Weird but it still worked. I'm still curious, why does that error come up? Thank you for your response.
Ok, so I have made progress. I've built my header file, implementation file and the file that calls my implementation.
I've run into a single problem. I keep getting, Program received signal:...
Hello folks,
I need to write a function that takes a C-style string as an input and returns its length. It must be done in a modular way by creating three separate files, stringLen.h, stringLen.C...
Very helpful! Thank you very much. I fixed it. It makes sense, it took me 2 seconds lol.
I'm sorry but I honestly can't figure this out..
Could I input the number within the braces containing "cout" after I run the loop? Where n is equal to every iteration of i?
OK, I read up a little. I understand why my syntax was wrong. Here is my next question. First my code..
#include<iostream>
using namespace std;
Thanks for the speedy reply. I looked in my book but it doesn't give me a lot of examples. Also..
I have to declare n as an integer still, correct? Also what does i+=2 mean? I know it is i = i +...
Hello there!
I am new to programming and I am having trouble with a homework assignment. I was hoping someone could point me in the right direction.
I need to use three of the loop commands,...