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...
"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...
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...
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...
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...
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...
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...
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...
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
*...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.