Sorry, I know this is off-topic, but my computer is lagging so much 15 - 20 minutes after boot-up. This is after I had to format my entire HD due to adware from kazaa (even adaware couldn't totally...
Type: Posts; User: dat
Sorry, I know this is off-topic, but my computer is lagging so much 15 - 20 minutes after boot-up. This is after I had to format my entire HD due to adware from kazaa (even adaware couldn't totally...
I always thought the . (dot) operator had prescedence over the * (derefernce) operator so wouldnt you need to do itl ike this?
(*person).member
You really think java is a rip off of C? You know that Java's "parent" is C/C++? So a lot of the syntax and ideas are similar, but i like to see someone go build a applet with C++. Plus java has it's...
Really no way to make a GUI app? I'm not trying to be philosophical in my question and definitely not in the answers I'm looking for. Anyways, I just tried google and there are literally hundreds of...
I know there's the winAPI and MFC. But I want something that's free and easy to use. Something similar to the tk GUI package that comes with tcl and perl. There's FLTK, which seems cool, but it's for...
Does anyone know where I can find documentation on the turbo debugger 5.5 from borland? I've tried the site but can't find any docs; the only thing i was able to find out was that the free debugger...
Update:
After passing the right argument to my stackTop() function, the program worked. And in case you were wondering, it converts infix notation such as 1 + 2 to postfix, such as 1 2 +
Dave_Sinkula actually understood my question, but here's the full source:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define LENGTH(x) ( sizeof((x)) /...
while( stackTop( sHead ) != '(' )
some code;
and the definition of stackTop is:
char stackTop( Node *s ){
if( !isEmpty( s ) )
Hey guys, I'm having much difficulties with a problem from my C book. The problem asks you to convert an infix notation, such as "1 + 2" to the more computer friendly postfix, "1 2 +". I tried with...
are you reading C How To Program by Deitel and Deitel? i had the same confusion when i first read the chapter, but you just have to reread it and reread it carefully. It's not an easy topic, but once...
I read in a 'int' using scanf, then a 'char' using scanf again, but the 2nd scanf reads the <enter> instead of the character that I type in next. When i add a \n in my control string like this:
...
Can anyone tell me what #pragma does? I'm trying to write DLL's and I see examples using the line:
#pragma comment(lib, "theDLL.lib")
I know that if u include that line u can call functions...
Yes I know that but if you look at my function mazeTraverse, I haven't been able to figured it out. I tried one way but the 'X' goes back and forth.
#include <stdio.h>
#include <stdlib.h>
void printMaze( const char maze[][12] ){
int i, j;
system("cls");
for( i = 0 ; i < 12 ; i++ )
for( j = 0 ; j < 12 ; j++ ){
Good point
Yeah I thought of a 2D array too but it doesn't work. If I input these numbers:
1 2 3 4 1 2 3 4
Then my array should be 2 (rows) by 8 (columes). I test the first element (the number 1) to see...
I'm only up to pointers and arrays in my book, so this problem can be solved w/o link lists.
Can anyone explain to me how to count the number of occurrance of any number? Say for example I inputed this into my program:
1 -3 -3 1 2 4 6 1
Then my program should print this with the result...
Huh?
Will I ever use "Pointer of type pointer to int?" Or any other type like double, char or whatever? And if so, when and where?
Thanks,
Dat
Usually in recursive functions the recursive part (the part where you call the function again) is not nested within a condition, and the "base case" is in an conditional statement. This style...
How do I make many consecutive white spaces into one white space? I tried this:
int c, last_c = '\0';
while( (c=getchar()) != EOF ){
if( !isspace(c) && isspace(last_c) )
putchar('...
i put the line:
#include "is_prime.c"
in my prime.c and it works, but shouldn't it work anyways since I already included the line:
Hello, I'm working on an exercise in my book. It tells you to write a program that will print out the first n prime numbers, where n is inputed by the user.
My output is should like this (which it...