I have a character array of fixed length. How do I erase every character in this array? I can't use string.h or any other string manip class in my code.
for (int i = 0; i < fixedLenght; i++)
...
Type: Posts; User: diddy02
I have a character array of fixed length. How do I erase every character in this array? I can't use string.h or any other string manip class in my code.
for (int i = 0; i < fixedLenght; i++)
...
Thanks, that explanation really helped out!
Unfortunately this not what I'm seeing.
void changeString (char* chSt)
{
chSt = "blah";
}
int main(int argc, char** argv)
{
Hey all
This is a newbie question... I want to pass a couple of strings to a function and then have that function modify them. The function isn't returning anything, just modifying the strings......
Hey all,
I'm trying to create a TCP client app and TCP server app using C (sockets w/ linux and winsock with windows)
I think I have the opening/closing sockets part down for both apps. The...
The only member in the Matrix class is a 2D vector.
And yes, I meant function prototypes, not function headers.
As for whether I am allowed to modify function headers: No. I tried to modify them...
For an assignment, I've been given function headers and I have to write the actual functions to go along with the headers. About half of all of the functions in the program are supposed to be written...
Hey all! It's been a long time. I finished a C programming course over the summer and now have some basic knowledge in C... but where to now? I want to know a lot more! School has started up for me...
Haven't done pointers yet.... So I'm supposed to do the program w/out them. TIA.
#include<stdio.h>
#include<conio.h>
#include<string.h>
And then how do you define the function? Sorry, I'm just really confused... what you said before just results in more errors.
Hey all... I was wondering what's the proper syntax for passing structure ints/chars, whatevers to a function... here's my function:
void hi_val (int, int);
It takes arguments, but no return...
Theory was correct, thanks for your help. And Quzah, sorry for knocking on you. You've been really helpful to me throughout all my problems with C.
That little Yoda bit (haha, yodabyte) shows you how absent minded Iam... I forget things easy... but try to understand my plight... my tutor didn't teach my any of that stuff. She expects me to do...
Spaces seperate my strings... so it takes the value for the next scan f... and Quzah... man stop being so harsh on me! I know I forgot the & op... I was typing in a hurry. Okay a few questions about...
printf("\nEnter Adress(IE, if your adress was\n123 Fake street, type in 123 Fake street).");
scanf("%s", person[x].adressno);
So then would the above be valid? I don't want to use fgets because I...
Hmmm... I seem to be stuck. I'm using structures and I need to get user Adress and user Postal Code...
For address how do I stop current string/start new one with one space? Like 123 Fake...
Haven't learned strncpy() yet... can I do it with strcpy? And could you please explain how I could define it when I declare it? Thanks.
Oh and sorry for the over-tabbing... I've been using this whack program that doesn't have one tab equal one tab...
Hey all... I'm having some problems with Strings... How do I define a string after I've declared a 2d array? I know it probably sounds confusing, and here's my code. The purpose was to type in a...
*smiiiiiiile* Thanks...
My tutor won't expect me to do that... I doubt it.
Okay... here's like my last attempt... it's 2:00 flipping AM and I know I won't get this done, but, let's hope. 1-200, prime.
Prime can only...
No, still nothing. Of couse I tried. I don't understand what they say. They state there is no formula to compute Prime variables. So then how is it my teacher expects me to do this exercise?
Prelude...er.... what? Sorry to bother your tired fingers but google gave me crap. Yes, I'm shocked too, but I didn't find anything of use...
What is N? N-1- ... gah, I'm confused man. And I've...
I'm really a newbie at C... and so far I didn't understand your method much, moi. I kind of understood dog... but what did you do when you typed in "typedef int bool;"? Thanks, to all of you and I'll...
I checked some prev. threads but I didn't find what I'm looking for... sorry if this is a repost. I understand single dimension arrays... and second dimension arrays (not as well as single though),...