Search Results

Showing results 1 to 40 of 86
Search took 0.01 seconds.
Search: Posts Made By: vicky_dev
Forum: C++ Mar 10th, 2009
Replies: 7
Views: 446
Posted By vicky_dev
In You are passing tempdate by value to incrementdate. So the statement
tempdate = temp_dat;
makes no effect to the tempdate variable of main. So tempdate of main still contain the original...
Forum: C Mar 10th, 2009
Replies: 10
Views: 887
Posted By vicky_dev
You seem to have got your rows and columns mixed up... If you're using an array as a matrix, then the first index usually denotes rows, the second one columns.

Here is the code that is working on...
Forum: C++ Mar 10th, 2009
Replies: 3
Views: 270
Posted By vicky_dev
You could go along these lines...

const int WORD_LEN = 3;

for(int q=0;q<r;q++)
{
for(int p=0;p<c;p++)
{
if( q < r-WORD_LEN) //vertical
{
Forum: C++ Mar 10th, 2009
Replies: 3
Views: 270
Posted By vicky_dev
const int WORD_LEN = 3;

for(int q=0;q<r;q++)
{
for(int p=0;p<c;p++)
{
Forum: C Mar 10th, 2009
Replies: 10
Views: 887
Posted By vicky_dev
No #define will not cause that problem... Thats more of a programming style issue.

Magic numbers are the constant numbers used in your programs, which give no clue regarding their origin....
Forum: Java Mar 10th, 2009
Replies: 2
Views: 318
Posted By vicky_dev
Well, this question has more to do with regular expressions than Java... Anyways I'll try to define what the Regex "J.*\\d[0-35-9]-\\d\\d-\\d\\d" means.

.* will match any number of any characters,...
Forum: C Mar 10th, 2009
Replies: 10
Views: 887
Posted By vicky_dev
Try


fscanf(cfptr1, "%f", &a[i][j]);


instead of


fscanf(cfptr1, "%5f", &a[i][j]);
Forum: C Mar 10th, 2009
Replies: 11
Views: 868
Posted By vicky_dev
Its hard to answer without details of the environment/IDE/compiler you are using.
I am guessing your are using a DOS mode IDE like Turbo C/C++. If it is so your program will run in the DOS (16-bit)...
Forum: C++ Mar 10th, 2009
Replies: 4
Views: 739
Posted By vicky_dev
If you look at the way in which the objects are laid out in memory, BASE and DERIVED pointers to the same DERIVED object have the same address (unless there is multiple inheritance involved). So you...
Forum: C++ Mar 6th, 2009
Replies: 2
Views: 290
Posted By vicky_dev
I'm using pure Win32, no MFC... Guess I'll have to reinvent the wheel!
Forum: C++ Mar 6th, 2009
Replies: 2
Views: 290
Posted By vicky_dev
Hi,
I need a control my native application written in C++ that provides a functionality similar to the SplitContainer control of .NET (System.Window.Forms.SplitContainer). I couldn't find any...
Forum: C++ Dec 12th, 2008
Replies: 2
Views: 1,312
Posted By vicky_dev
I do add the length of the message in the start of message, and thats what I want to read in recv (8 bytes)! I was wondering if its really necessary to loop just for 8 bytes.:-/



As far as my...
Forum: C++ Dec 12th, 2008
Replies: 2
Views: 1,312
Posted By vicky_dev
Hi,

Please let me know if this post doesn't belong here... I couldn't find a dedicated forum for network programming, so posted this here.

I'm developing a client and server for using...
Forum: Java Oct 6th, 2007
Replies: 17
Views: 3,015
Posted By vicky_dev
Thanks again... The registry keys were exactly what I was looking for. Well my app is required to run only on Windows, so platform-independence is not an issue right now. I chose Java simple because...
Forum: Java Oct 5th, 2007
Replies: 17
Views: 3,015
Posted By vicky_dev
Thanks everyone, I now know many ways to distribute my Java apps... jar files, batch files, web start or exes'. You guys are really helpful...

One more question... Is there a standard registry...
Forum: Java Oct 4th, 2007
Replies: 17
Views: 3,015
Posted By vicky_dev
Yes, I know all about javac and java and compiling and executing Java programs... Thats really the first thing I learnt. But I wouldn't expect the end users of my application to go to the command...
Forum: Java Oct 4th, 2007
Replies: 17
Views: 3,015
Posted By vicky_dev
Well a .jar file open with WinRAR on my system! It seems that jarfiles are like a collection of zipped .class files.
Forum: Java Oct 4th, 2007
Replies: 17
Views: 3,015
Posted By vicky_dev
No, it is not so on my system. The .class does not have an association with any program and isn't opened. I have to select the program I want to open the .class file with.

What I'm actually...
Forum: Java Oct 3rd, 2007
Replies: 17
Views: 3,015
Posted By vicky_dev
Hi everyone, I need to be able to run a Java application (not an applet) directly, that is not from an IDE or the command line. How can this be done for a Windows PC? I have seen many applications...
Forum: C Jun 28th, 2007
Replies: 6
Views: 1,250
Posted By vicky_dev
Found the reason, finally...
@thekashyap
You were actually right!


I checked and it turns out there is a shared library /usr/X11R6/lib/libX11.so. So I figure -lX11 refers to libX11.so if it...
Forum: C Jun 26th, 2007
Replies: 6
Views: 1,250
Posted By vicky_dev
@thekashyap
It makes a difference where in the command you write this option; the linker searches and processes libraries and object files in the order they are specified. Thus, `foo.o -lz bar.o'...
Forum: C Jun 25th, 2007
Replies: 6
Views: 1,250
Posted By vicky_dev
I believe this may be the reason, though dont know exactly how.


No, there are no .o files in the path, if thats what you meant.


Well, its true!
Forum: C Jun 25th, 2007
Replies: 6
Views: 1,250
Posted By vicky_dev
I have two static libraries:

/usr/X11R6/lib/libX11.a - Standard library, ~ 1.5MB
./libxbgi.a - Created by me, ~60KB
Now I use the following commands to compile a program, test.c:

$gcc -o test...
Forum: C May 25th, 2007
Replies: 7
Views: 5,242
Posted By vicky_dev
Well the reason is that I want "users" to be able to compile their code with my library without needing lots of compiler options... yeah, thats stupid. Another reason is that the location of libX11.a...
Forum: C May 24th, 2007
Replies: 7
Views: 5,242
Posted By vicky_dev
@thekashap and Narue:

I know both are acceptable solutions, but what I'm looking is for the library libxbgi.a itself to contain the linked object codes from libX11.a and libm.a

Kinda...
Forum: C++ May 24th, 2007
Replies: 3
Views: 811
Posted By vicky_dev
You have to write two more functions to compute the total marks and the highest marks.

I can suggest the prototypes as:


void totalmarks( int &currentTotal, int &marks );
void highestmarks(...
Forum: C May 24th, 2007
Replies: 7
Views: 5,242
Posted By vicky_dev
Hi...
I have a static library, libxbgi.a. When I want to properly link a program with this library I have to write:

gcc prog.c -o prog -lm -L /usr/X11R6/lib -lX11 -L. -lxbgi

It is...
Forum: Java May 22nd, 2007
Replies: 4
Views: 2,433
Posted By vicky_dev
No buddy, not here... Looks like you're new to this... Create a new thread for your question. Don't reply to an existing thread and ask a question there.

And here I was anticipating a...
Forum: Java May 21st, 2007
Replies: 4
Views: 2,433
Posted By vicky_dev
Ok, thanks. That was helpful [:)]
Forum: Java May 20th, 2007
Replies: 4
Views: 2,433
Posted By vicky_dev
Hi everyone...
I need to build a file browser for a wireless multimedia device for a Windows PC. The objective is to be able to browse contents of the device. The device defines its own...
Forum: C++ Mar 18th, 2007
Replies: 6
Views: 1,142
Posted By vicky_dev
You can do this to have the same effect:


#define a +

int b = (2 a 3);


But 'a' is not really a variable here.
And I see no reason why you would want to do that...
Forum: C Mar 18th, 2007
Replies: 2
Views: 1,347
Posted By vicky_dev
Got it, thanks.
Forum: C Mar 17th, 2007
Replies: 2
Views: 1,347
Posted By vicky_dev
Check this code:


float velocity, acc, time;
.
.
velocity = velocity - acc * time

if( velocity == 0.0 )
{
Forum: C Dec 19th, 2006
Replies: 5
Views: 1,639
Posted By vicky_dev
>> Is the file a binary file or text file?

It is a text file, because I am creating the file in some other program.

>>this is how I would have coded it


i = 0;
while( i < count && fin >>...
Forum: C++ Dec 18th, 2006
Replies: 2
Views: 2,439
Posted By vicky_dev
If you are going to erase and redraw without sufficient time interval in between, it will cause blinking which is visible. You don't need to draw anything until the position of the second hand...
Forum: C Dec 18th, 2006
Replies: 5
Views: 1,639
Posted By vicky_dev
I want to read a file which contains a list of integers. The first 4 bytes( or whatever sizeof(int) is ) indicates how many numbers the file has.
Suppose I check the file size before reading so...
Forum: C++ Dec 15th, 2006
Replies: 3
Code Snippet: Convex Hull
Views: 3,132
Posted By vicky_dev
This program solves the geometric problem, called the Convex Hull problem. Given a set of points, the objective is to find a region such that the line joining any two points lies within that region....
Forum: C++ Dec 15th, 2006
Replies: 6
Views: 2,920
Posted By vicky_dev
There is a better way to do it:


char buffer[30];

sprintf( buffer, "i = %d", num );
outtextxy( x, y, buffer );
Forum: C++ Dec 15th, 2006
Replies: 47
Views: 65,061
Posted By vicky_dev
Multiplication, division and modulus operations on powers of 2 can be made much faster using bitwise operators.

1. Modulo
Finding the modulus is particularly expensive. This operation can...
Forum: C Dec 12th, 2006
Replies: 7
Views: 2,387
Posted By vicky_dev
Actually both the function pointer and the function must have the same prototype,



void (*fptr)(const void* , const void*, ... );

void f1(int*, int*, ... );
Showing results 1 to 40 of 86

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC