Don't know!!! But ....
I can tell you that I use SciTE as my go-to editor! Here's the complete output:
>gcc -Os -std=c99 -pedantic test-pointers3.c -o test-pointers3
test-pointers3.c: In...
Type: Posts; User: dukester
Don't know!!! But ....
I can tell you that I use SciTE as my go-to editor! Here's the complete output:
>gcc -Os -std=c99 -pedantic test-pointers3.c -o test-pointers3
test-pointers3.c: In...
I've tried that, and although it compiles, I get the same warning:
warning: format ‘%p’ expects argument of type ‘void *’, but argument 2 has type ‘int **’ [-Wformat]
So casting to (void *)...
The following should help me and others:
C Printf and Scanf Reference
I should explain the situation a bit more clearly ....
My original test code was:
#include <stdio.h>
int main(int argc, char *argv[])
{
For example:
#include <stdio.h>
int main(int argc, char *argv[])
{
int x;
int *ptr;
Using the latest gcc incarnation, why wouldn't the following work??
(void) scanf("%d", &blah);
gcc keeps on barfing up the "unused value" warning....
It'll shut up, if I test the return...
Thanks! I'll have to give that a try ....
You bet!! I have that commented out in my code. I had tried it out both ways ...
Thanks for the input!
Does this code that I cranked out give some indication that I'm getting it, or am I just dreaming in Technicolor?
#include <stdio.h>
int main(int argc, char *argv[])
{
int myAge = 65;...
@Bayint Naung
printf(" sum = %d &sum = %p \n", sum, (void*)&sum);
did the trick! Thanks!
--
Duke
Sooo many details to learn for a noob! :) Thanks! I'll flip to the 'casting' section of the tutorial, and add to the growing body of knowledge/frustration? :))
BTW , I bookmarked the above URL....
hey ...
Here's the warning:
warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘int *’
Here's the code
C++ Utopia?? :D
OK! OK! I'll burn the Turbo C Manuals - along with all the other OOP detritus that has accumulated in my den over the years. :)
@Bayint Naung
What you say may all be true! I'm not suggesting that I would/want to use Turbo C for production work - just as a learning tool. However, the point is moot! Like I said, I'll most...
FYI - to those who have been following this thread ...
Turbo C v2.01 loads and runs normally on my AMD Athlon XP 2000+ based machine running XP Home. As well, it compiles C code - no probs! The...
I just had a quick "boo" at the Pelles Forum. Seems that joint is overrun with "spuds" too. :)
Thanks for the extra info.
--
Duke
Saw you comments regarding Pelles C -- thanks!
--
Duke
@CommonTater
Much obliged! Looks pretty darn good ...
--
Duke
@jimblumberg
I'm convinced! :)
--
Duke
@staha01
I almost sure that Salem is going to jump in and "second" your recommendation! :D Thanks!
@Salem
Your reply here might just have answered my question about using Turbo C (and it's manuals) in another thread :)
Funny thing though - the code compiles under Linux (gcc) with no warnings...
hey ...
I happen to have Turbo C c/w the manuals. Although I'm on *nix 99% of the time, I do have XP on a separate partition. Will Turbo C complicate my C learning process more than help it, in...
Hello list ...
I think I'm grokking it - but please critique the following code and comments therein:
/*
program to demonstrate the use of pointers and
malloc to dynamically allocate...
As a former USMC enlistee with his "gold wings", I can say that the first time I jumped out I was scared. The 2nd time, that sorry-ass Jump Master had to push me and a bunch of others out. :)) Dirty...
@Tater
Aaah! Come on! Don't the OOP guys do _that_ all the time? :)
--
Duke
@Tater
Yeh! You're right! Not worth the bother.
I know _some_ C :) I'm fluent in Perl and PHP; learning Ruby at the moment. Can also get by in newLISP. So I'm not totally clueless - but yeh!...