Nevermind, got it. Thanks for the help.
Type: Posts; User: serg_yegi
Nevermind, got it. Thanks for the help.
Thanks a lot. Is there anyway you can top me on how to avoid argv[0]? Everything I've tried so far has produced errors.
Do I need to assign qsort to something, because even with the argc replacement, I get the same incorrect results.
I'm trying to alphabetically sort my argv[] array, which will hold char pointers(strings) from the command line. This is my code, but it doesn't seem to be doing anything. Anyone see whats wrong?
...
Hey guys, I'm trying to figure out what's wrong with my code. The goal here is to insert linked list entries alphabetically. The basic construct of this program is as follows: You start off with a...
I thought so too, but isn't the line "p1d = (struct node1d *) malloc(sizeof(struct node1d));" in the bottom function supposed to do that?
Does anybody have any idea why my output displays the 1d node name for both the 2d nodes "alice" and "joe" to be "bob" when my input is: "Ins alice wife", followed by "Ins joe bob". I'm really stuck...
How would I use getline in this situation?
Well suppose I don't know how long the input is going to be. I can't specify a specific array size in that case, can I?
Can someone tell me why my code isn't printing "it worked" when I input 'In' into the console?
int main (int argc, char *argv[]) {
int i;
char* input="";
struct node2d *p2d=NULL;
for...
Can someone help me to understand why there are semicolons after the brackets in this method, and or what it actually does? It's part of a program that constructs a sort of linked list.
int...
Thanks all, I got that part running. One last question: The program is supposed to replace all backspace characters with "\b". How would I go about inputting a backspace into the command prompt so I...
I'm trying to write a program in which I check whether a certain character is a '\', but when I code the line else if(c=='\') I get a "newline in constant" error. Any ideas?
Ah there you are. Ctrl- Z twice worked. Thanks a lot everyone for the help. Do I need to mark this thread resolved or something along those lines?
Strange, ctrl+z just seems to put ^Z into the command prompt and does nothing after I press return.
Ah, there you go. I in fact did not know how to signal EOF in the terminal. I used the ='Q' trick and the code worked fine, but how do I signal EOF exactly?
Visual C++ is a GUI and compiler from Microsoft. I changed what you asked to no avail.
I inserted the return 0; statement by the way, alas to no avail.
The reason for the int _tmain and "stdafx.h" is because I copy pasted it directly from Visual C++, and that seems to be it's convention of setting up the code and precompiled headers. I might be...
Hey guys, I'm new to this forum and the C programming language. For some reason, I can't get this relatively simple program to print out the number of tabs, blanks and newlines I have in the input....