Using C++, how can we precisely display text/strings on the screen exactly where we want to?
I am writing a very long C++ program, of course by making use of my own functions or sub routines, to...
Type: Posts; User: devarishi
Using C++, how can we precisely display text/strings on the screen exactly where we want to?
I am writing a very long C++ program, of course by making use of my own functions or sub routines, to...
So, you have done your job quite efficiently and effectively! ;)
Hi,
I think I fixed it. Thanks a lot to you all!
Cheers!
Dev.
Okay, I compiled the program and the following warning message flagged:
if ((str = fgets(str, size, stream)))
Warning: TRYIT.CPP 37: Possibly incorrect assignment
However, I ran the...
Hi LaserLight,
Why didn't you choose to make your name Light of Knowledge? Haha!! Well, thanks for your support. Now I am leaving for the day as my shift has ended. So, I will try it later on if I...
Well, I have used flushall() after gets() and scanf() this time and it serves the purpose efficiently. However, I would like to eliminate the need of using flushall() at all.
Well, I have tried getchar() also and it does the same thing as flushall() does but with the requirement of pressing one more key after pressing Enter when a value has been entered. Besides, if the...
Hi,
I just tried fgets instead of gets and as it is used for file handling it doesn't serve the purpose I have set in the given program.
Or could you please give an example?
Thanks!
Well, when I run this program it works fine in the first run of it but from the second run it begins to annoy me (or the user):
#include <stdio.h>
#include <conio.h>
#include <ctype.h>...
No, Laser Light, my text book doesn't explain the code. It has simply stated what type of linked list are there and what they do. But it says nothing about how they work and are used.
Here's a program which is found in my text boob of C. I don't know what and how it does the work. When I ran it, it had errors which I rectified somehow.
#include <stdio.h>
#include...
Hi,
I am not getting Link List at all. Can anybody help me understand it? I have got an example program which is as follows:
#include <stdio.h>
struct list_el {
int val;
Thanks for your help! But this program has got many errors when I compile it. You might have forgotten to try it.
Hi,
If you want a comprehensive and good example of file handling which involves all the things you have mentioned. Moreover, you will get some extras also. :) Just let me know if you want it.
IceDane, your program is amazing!
For the rest of the users here, I would like to make this note:
Save this program (for example 3d.c) and after compiling go to command prompt and change...
Well, I will come up with an example soon.
Can somebody give a good and simple example of a 3D Array displaying the provided values neatly on the console/screen so that one can easily understand how it is working?
Example 1:
int...
The given below code doesn't display anything on the console/screen.
system("cmd /c dir");
Well, my Path is also correct. I am using TC & TCPP (Turbo C++ ) compilers. However, now I have...
Well, it is also not working. The same error message, as given above, is there. :(
Hi,
"Nonportable pointer conversion" warning message is being flagged highlighting the code line:
FILE *dir = popen("dir", "r");
Just now I have tried it again and this time included...
Well, when we have two or more instances of the scanf() or of the gets() functions, at any level we may need to go back to a previous one at run time to edit what we entered before as we do it on any...
Hi,
Thanks for your post but it's not what I wanted to do. I want to display the contents of a folder containg files and folders by running the DIR command of DOS.
However, your program's...
I have come across an example but it is meant for C#
Link: http://www.codeguru.com/csharp/.net/net_general/tipstricks/article.php/c6933
Hi Adak,
That's great! Well, I am also using Windows XP.
The function system() can be used for executing a DOS Command or Application from inside an executing program.
Exaple:
#include <stdio.h>
#include <stdlib.h>
void main() {