Posts
 
Reputation
Joined
Last Seen
Ranked #378
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
73% Quality Score
Upvotes Received
11
Posts with Upvotes
7
Upvoting Members
8
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
10 Commented Posts
~32.0K People Reached
Favorite Tags
Member Avatar for DemonLady

No, never use scanf. Use fgets or even fread or read, and sscanf maybe. But then, the numbers conversion by sscanf is not specified in standard anyhow. And using %d, the sscanf does some strange things. %d must read int, but when we read into int and then print that …

Member Avatar for Ajini
0
3K
Member Avatar for ~s.o.s~

C wiki, with a lot of resources [url]http://www.iso-9899.info/wiki[/url]

Member Avatar for mack1
29
5K
Member Avatar for satish_dukkipat

Indeed it seems that the only thing which standard says concerning the unary ++ and -- operators, is that the value of the operand would be obtained for use in expression, either before (postfix) or after (prefix) applying the operator. What remains unspecified is the order of evaluation of the …

Member Avatar for deceptikon
0
221
Member Avatar for pavani2006

Yes vim has these features as well, it is indeed better to use programmers editor instead of ide. If you have makefile, why do you then need all these additional files which IDE makes, like project file, and that's often even not the only one. And all these additional features …

Member Avatar for sujitha77
0
2K
Member Avatar for asilter

So you want a somewhat dynamic array. For really dynamic array you should implement a linked list, which is not very difficult either, but you must be careful because mistakes in implementing it can easily cause a memory leak. But it depends, how are you going to use your array. …

Member Avatar for IcantC
1
173
Member Avatar for bilalb1

I don't know what this "opening a folder" exactly supposed to mean, but one thing which is usually always available, no matter what desktop you use, is xterm. This opens xterm in the directory /pathname/foldername and prints the directory contents: system ("xterm -e 'cd /pathname/foldername && ls && bash'"); Then …

Member Avatar for Ancient Dragon
0
546
Member Avatar for ellenski

I want to say only that, use some more modern compiler than turbo c, like gcc (mingw or cygwin in windows). Turbo c is an extinct compiler, somewhat hopelessly outdated, and you cannot find libraries for it etc. Otherwise, using conio is perfectly ok, there is conio for windows, and …

Member Avatar for kvprajapati
-4
296
Member Avatar for harshchandra

Thank you, good algorithm! The same using GTK, which shows that it's not very difficult to port simple graphics to another graphics library, i don't know though whether i guessed the colors right. [code] #include <gtk/gtk.h> #include <stdlib.h> int diskisin [5], posinpeg [5], diskcount [3], width = 655, height = …

Member Avatar for akhil1989
2
2K
Member Avatar for SOFTHEME

Disgusting, i'm for all programmers to get paid for what their work is worth, not playing with them by taking job from programmers somewhere and giving it to programmers somewhere else. And concerning your government supported IT companies led by communists, i would advise not to have any deal with …

Member Avatar for ehly888
0
244
Member Avatar for TkTkorrovi

You likely want something graphical, where the things move. GTK version of the classic arcade game Asteroids.

Member Avatar for TkTkorrovi
0
127
Member Avatar for TkTkorrovi

A small demo about how to use GTK label as a simple console. To compile GTK program, `pkg-config gtk+-2.0 --cflags --libs` should finally be somewhere in the compiler command line in the bash-like shell.

0
298
Member Avatar for TkTkorrovi

Replaces every occasion of the pattern, or only the first occasion if there is a subexpression, between \( and \), anywhere in the regular expression, as repeated replace is not what one would expect in that case. The string size is restricted in POSIX regular expressions to the size of …

Member Avatar for xaviv
0
1K
Member Avatar for Narue

Thank you for putting up this, it's nice, and certainly much more advanced than mine, though I just wanted to provide a minimal kit which enables to edit files. I have a few questions though, not necessarily about your code, but about such things in general, my code is not …

Member Avatar for Ene Uran
0
144
Member Avatar for TkTkorrovi

A very rudimentary more, press enter to view next screenful of text, like with print command in ed text editor.

0
99
Member Avatar for TkTkorrovi

Similar to cat in unix textutils. You can actually edit files with these. Remember that ctrl-z sends end-of-file in windows, and ctrl-d in linux.

Member Avatar for Dani
0
99
Member Avatar for TkTkorrovi

Text fragment extractor (usage: fragment /pattern/[n] [/pattern/[n]] file), similar to the print command in ed and vi, with pattern range. If the second pattern is omitted, prints to the end of file. Use quotation marks when there are spaces in the argument. Finds the first pattern, then the second pattern, …

0
126
Member Avatar for xponse

Yes it sounds complicated, and any stdafx.h is not a standard c header, either. What is GPP? If you mean gcc, then why it's complicated? Use command line, gcc something.c -o something.exe (in mingw and cygwin) is all you need to compile a standard c program, nothing can be any …

Member Avatar for ~s.o.s~
2
436
Member Avatar for #include_rose

Ancient Dragon is right what concerns scanf. I thus say that in the capacity of the right shouter, like in a meeting someone shouting "that's right", may significantly increase the credibility of the statement made by some other person. Additionally, scanf is a proper function only on condition that no …

Member Avatar for jephthah
0
209
Member Avatar for austinslik

What is the end condition in your for statement? There, your i is 10, you iterate up to the value of some element of your array, which is bigger than the array size. You go beyond the limit of the array, which may cause any kind of unexpected behavior. But, …

Member Avatar for austinslik
0
119
Member Avatar for asilter

I included stdlib.h, and my compiler doesn't give any warning, even with all warnings on. Without stdlib h it says "incompatible implicit declaration of built-in function 'malloc'" gcc 4.1.2, debian linux.

Member Avatar for SphinCorp
0
292
Member Avatar for Dave Sinkula

I think you are good people, i indeed believe that you are good people, and therefore it's natural that you want to believe that world is good, with occasional few bad guys somewhere.

Member Avatar for jwenting
0
510
Member Avatar for TkTkorrovi

I was banned from DaniWeb IRC after jtwenting saying to me that if i were in gulag, i didn't last five minutes when i didn't lick the shoes of the party apparatchic, and after i dared to say anything to defend myself, what i said was only that whether he …

Member Avatar for Serunson
-1
179
Member Avatar for siddharthrainit

I don't know the borland c graphics api and don't recommend to use it, as it's just a commercial library, not standard, not open source and not cross-platform, not very good either. No one agrees with gtk seemingly, but then at least use opengl, or even sdl. But why the …

Member Avatar for Colin Mac
0
159
Member Avatar for zite.1

I only wanted to say, that i don't want to read Narue's posts, as i'm a victim of serious violence by him/her, with which he maybe made it impossible for me to continue here. Just please remember that someone else may be next.

Member Avatar for Narue
0
109
Member Avatar for bhmails

Well it's getchar but getchar is not exactly equivalent to the getche in borland c... By default, the standard input in c is in the canonical mode, which means that all input is line buffered and the line would be received only after the linefeed. This means that no matter …

Member Avatar for TkTkorrovi
0
287
Member Avatar for calipxo

Well we would not start to teach you mathematics here, finally this is a programming forum, you may ask these questions in some mathematics or physics forum. But in short, there are other ways to calculate x^y than to multiply x y times, which is even not possible when y …

Member Avatar for TkTkorrovi
0
110
Member Avatar for manjuannthomas

I may help if i knew how far you actually are. It is not very difficult to write a simple text editor from scratch, first you likely have to implement a doubly linked list of pointers to lines, at least this is how it is implemented in many text editors. …

Member Avatar for TkTkorrovi
0
77
Member Avatar for sInFuL69er

Yes, Salem is right, %c gives you a character with a corresponding code, not a number, 1 1 0 1 0 1 1 1 is exactly what your program outputs when you use %d. Also, when you initialize the arrays, you don't always have to provide the size, like in …

Member Avatar for TkTkorrovi
0
69
Member Avatar for asilter

Load shared library, and call a function in it. Don't use debugger, instead add debug statements to the code, it's much more efficient and faster that way.

Member Avatar for TkTkorrovi
0
76
Member Avatar for asilter

I don't know, maybe it's c++, like there are every kind of weird << and >> in cout... But at least it's not c. Following the typedef identifier should be a declaration, which mostly starts with a type, not with map> something... With typedef you define type, you can use …

Member Avatar for Salem
0
77