Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: irfin
  • Order by date
  1. irfin

    Printing multiline text strings

    Just want to give some alternative, to make it easy when you have to write System.out.println several times. Because it's quite long to type it ;p public static void printf (Object str) { System.out.print (str); } So instead of using System.out.println (or print), you can simply use the...
  2. irfin

    Newbie question about the "¦" sign and some more.

    The | sign is the OR operator in boolean algebra. 0 represents false value, and 1 represents true value. 0101011 1001101 ------- OR 1101111 Irfin
  3. irfin

    Newbie error

    "illegal start of expression..." hmm.. big possibility that you have error in your syntax. Check all your code (line by line :D) happy debugging! BTW, you are not trying to simply write: public double getModulo() { /* rest of this method's code */ } and then compile it, without...
  4. irfin

    cin.getline being strange...

    try to add fflush(stdin). It will flush the input buffer. #include <stdio.h> ... void Address::GetAddress() { cout << &quot;Your address: &quot;; fflush(stdin); cin.getline }
  5. irfin

    program i should use?

    If you really want to start from beginning (but a usefull beginning) and sharpen your skill, you should try to program in DOS first. Try Pascal (write a DOS program). After a while learning Pascal, try to compare it with BASIC. See how easy BASIC is. After that, learn C and try to understand it...
  6. irfin

    Clearing the screen

    If you work on MS-DOS, it will be simple. Just include the header file conio.h, and call the clrscr() function. Just like icici said. But if you program in Unix/Linux, there's no conio.h file in there. So you gotta do it with printf() function (I think there's other way too). Sorry I forgot the...
  7. irfin

    Do you know any good C compilers and Editors?

    Well, you can still use Turbo C++ ver. 3.0. But it runs in DOS mode in Windows 2000. But you can only create 16bit application. oh yes, in real mode :p But if you want to create 32 bit application, maybe Visual C++ is a good choice. Because you can still built a simple DOS application, or using...
  8. irfin

    Showing a float on a bar code scanner

    Well you can convert your integer first to string and then manipulate the strings as you like. You can use the built-int function itoa (abreviation for integer to ascii). syntax for itoa is: char * itoa(int value, char *string, int radix) Well you can read about this function in your C...
  9. irfin

    cprintf and printf - how to?

    You're right. If you try to use printf instead of cprintf, then the console will not display it like what you expect. Why? As I know, that's normal because if you change the forecolor or background color and you want to output it and get the effect, then you must use cprintf(). That's because...
  10. irfin

    Need the function of strcat using pointers??

    Shail is right. In Jude's code, in last line there is no '\0' character to close the string so the output is incorrect. Second, the algorithm is right, but in implementation using C, it's NOT SAFE because we store data beyond string1 and that could overwrite some information or other variable...
  11. irfin

    AI Question

    Well, try www.ProgrammersHeaven.com I found many source, and articles about AI and other stuff there.
  12. irfin

    comparing chars with pointer to cha

    I think this simple code will does the same thing (get character [A-Z|a-z|0-9|' '|'\n']. #include <stdio.h> #include <conio.h> FILE *fin; // filename for input file. int ch; // variable to hold a character being read. /** * This program uses command line argument. It needs only *...
  13. irfin

    Good place to start

    Well, for me, I started learn C from book (C Programming Guide - Jack Purdum) but I also have programmed in Pascal before (and I learnt it from book too). So if there's no one around you that could help you, you can learn C from books. And of course, try looking for book that will explain you C...
  14. irfin

    Sorting a structure

    Thanks for reading my answer. Well, I think the logic error lies in line: if ((indxfrec_t[i]) > (indxfrec_t[i + 1])) See, (because this is C - not C++) indxfrec_t is a struct so you can't just compare the struct by using its variable name, but you must using its member. Try looking at this...

Part and Inventory Search

Back
Top