165 Posted Topics

Member Avatar for Prabakar

Need A Little Help [B]Senario:[/B] In the near future I will have to transfer data from my computer to & from A computer infected by lots & lots of viruses. I do not have rights to modify, install or uninstall any software in the infected system. All I can do …

Member Avatar for salim hussain
0
104
Member Avatar for shriagni

Why all of the sudden old threads are renewed ? I made a reply to an old thread by accident & I did apologize for that. Now 2 more have been renewed.

Member Avatar for Prabakar
0
279
Member Avatar for rob_xx17

Ya, and for any other bases you have the formula log a ( base b ) = log a ( base c ) / log b ( base c )

Member Avatar for Prabakar
0
125
Member Avatar for stephen3200

<< int (*p)( void ) = &foo; 'foo' by itself is the address of the fn. so int (*p)( void ) = foo; will be enough, if I am right.

Member Avatar for stephen3200
0
110
Member Avatar for integer*09

>>you can save the new data in program A after each step I guess he said program A is not in his hands.

Member Avatar for ninjaneer
0
146
Member Avatar for Domino

EDIT: Oops replied in the wrong thread. Never ever thought that my search would actually give a thread from this forum posted way before & I would accidentally reply to it. [URL="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaik/rzaikodbcapicplusplus.htm"]http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaik/rzaikodbcapicplusplus.htm[/URL] I got this from google. Hope this is what you want. If you are already half way in …

Member Avatar for Prabakar
0
110
Member Avatar for &rea

RGB is a macro that takes 3 integer & returns a COLORREF & not a function, I believe. The link [B]niek_e[/B] gave had rgb() & not RGB() So I am not sure whether I am right. Give it a try. EDIT: I refered MSDN [URL="http://msdn.microsoft.com/en-us/library/ms532645(VS.85).aspx"]RGB[/URL] is indeed a macro Thats …

Member Avatar for Prabakar
0
202
Member Avatar for ramya_bugbuster

nice catch stephen84s. Then I guess the only way should be to play with bitwise operator

Member Avatar for jephthah
0
115
Member Avatar for Q8iEnG

[CODE=cpp]#include <cstdlib> #include <iostream> using namespace std; int main( ) { int pow ( int, int ) ; return EXIT_SUCCESS; } int pow ( int base, int power ) { if ( power ) { if ( power % 2 ) return base * pow( base, power-1 ) ; return …

Member Avatar for Q8iEnG
0
117
Member Avatar for paulcat

I cant explain much cause i am very new to win32 programs and then try this, MessageBox( NULL, TEXT("Welcome"), NULL, NULL ) ; EDIT: I should not have talked about something which I don't know:(

Member Avatar for Maulth
0
266
Member Avatar for Black Magic
Member Avatar for kux

Why is that I am not able to understand what you are talking? I was never thought about MAKEFILE :( What is a makefile?

Member Avatar for Prabakar
0
404
Member Avatar for joshmo

Dequeue is simple. since it is a queue you need head & tail. I don't know what you are trying to do with new_num. So I'll leave it. And it seems you want to delete all nodes in the queue with the dequeue() Actually dequeue deletes just the first node. …

Member Avatar for Lerner
0
156
Member Avatar for paolomontero
Member Avatar for paolomontero
0
225
Member Avatar for c++noobie

I read few lines of code. And so far I have found some silly mistakes 1) if (! argc > 1) will always fail because ! has higher priority than > this priority stuff confuses me a lot so I always use () to aviod the confusion 2) the string …

Member Avatar for c++noobie
0
196
Member Avatar for Prabakar

I am having problems with using the icons like bold, code, quote, etc (the entire toolbar). This is the first time I am experiencing it. I am using IE7 & also I am not able to use the save, cancel buttons while editing too. In other words I am not …

Member Avatar for caswellsam
0
141
Member Avatar for AnjaliAnuradha

I am preety lazy to use merge sort. The trick is to have an array of index which originally has numbers from 1 to n. and sort it along with the array. Here is a simple code. #include<iostream> using namespace std ; int main ( ) { int a[] = …

Member Avatar for mitrmkar
0
121
Member Avatar for dangana

the code is not intended properly, that's why we assumed missing {}. you have at least that right. I successfully found all { & }. 10 points to Prabakar:) What is the operation variable doing? You never assigned a value for it. I guess the program in itself incomplete. Are …

Member Avatar for jephthah
0
142
Member Avatar for SonxQ7
Member Avatar for zoner7
Member Avatar for Ancient Dragon
0
120
Member Avatar for VernonDozier

[QUOTE] x = new int**[dim1]; x[0] = new int*[dim1 * dim2]; x[0][0] = new int[dim1 * dim2 * dim3];[/QUOTE] Mine Mine, So far I have been using for loops for this. I cant imagine how stupid I was. Thanks guys.:)

Member Avatar for Prabakar
1
2K
Member Avatar for buddha527

I posted an Identical thread in c fourum & but mine was faster though. It takes a few minutes to find a combination. & then to improve the performance, I'll give the same link I recived [URL="http://web.telia.com/~u85905224/knight/eWarnsd.htm"] Warnsdorff's Algorithm[/URL]

Member Avatar for jephthah
0
2K
Member Avatar for Prabakar

I happened to try find the total number of ways a horse can cover all 64 squares in a chess board without visiting a square more than once starting from one corner. All I was able to do was to use a brute force algorithm which run for a whole …

Member Avatar for Prabakar
0
188
Member Avatar for toolbox03

I am confused looking at this thread. To convert a lower case letter to upper case I always subtracted 32 from the lowercase letter. Adding 48? Is this correct or is it a mistake. Please reply.

Member Avatar for jephthah
0
232
Member Avatar for monstro

[QUOTE=Ancient Dragon;608633]Both structure and class objects should be allocated in the order in which they are declared. If allocated dynamically then the memory will be in some memory that is unknown to the program (the memory allocation functions will of course know).[/QUOTE] I agree with Dragon, even if a random …

Member Avatar for Duoas
0
185
Member Avatar for Aamit
Member Avatar for picass0

You are not going to add any 0's Its already there in the text file isnt it, just skip '\n' in a if statement & read the file char by char. use mod like ed did & the code will be fine

Member Avatar for Radical Edward
0
92
Member Avatar for help22222

Use a struct on the first hand & since it is c++, its easy to swap a struct.

Member Avatar for Ancient Dragon
0
310
Member Avatar for sjinadasa

I am learning a lot after I entered this forum. Thanks a lot, and then why so harsh, I am scared reading this.

Member Avatar for jephthah
0
107
Member Avatar for nony0905

Well, I would like to start by giving the same advice I recived here. Dont use conio.h and the turbo c compiler. And Never Ever Use void main() search void main in this website & you woud know why. And as for your question, you read values till rows & …

Member Avatar for Prabakar
0
145
Member Avatar for purepecha

To check Wheather a no 'n' is prime or not why not check if 'n' is divided by the prime numbers from 2 to sqrt of the number 'n'? It would prove better

Member Avatar for Prabakar
0
114
Member Avatar for Onixtender

If you use dynamic allocation because I told you, then I am sorry, because I ment to use dynamic allocation for the random array. Since, every time you allocate a cluster of memory from the heap and is bound to be different form the previous one.

Member Avatar for Onixtender
0
182
Member Avatar for qurat

Preety simple. Enqueue: Get a data & then push it on to stack 1. squeeze stack1 like a lemon till it dries & collect them in stack 2. Dequeue: Squeeze stack2 this time & collect in stack1 pop the data from stack1. I leave one more important point for you …

Member Avatar for Prabakar
0
85
Member Avatar for Aamit
Member Avatar for Traicey

Excuse me, wont the second code make an infinte loop, I mean, 'i' will be less than n the whole time

Member Avatar for DigitalPackrat
0
404
Member Avatar for Onixtender

items should be an array of pointers, in this program, the chars are stored in item & not the pointers, char *items[10] ; should be used & in push just save, items[top++] = c; & similarly change, the pop() And also, fns defined inside main?

Member Avatar for Prabakar
0
139
Member Avatar for arunpawar

Teasing questions right. What is the output of this. #include<stdio.h> int main () { printf ( "%f", 10 ) ; return 0 ; }

Member Avatar for dougy83
0
117
Member Avatar for baku
Member Avatar for Prabakar
0
41
Member Avatar for nelledawg
Member Avatar for El Duke

Sorry, Cause I want to annoy you with the same question. <hbr> does not have an ending tag. <I>, <a>, <body> tags needs or may have attributes. if you are checking the beginning tag & ending tag, how will you handle this? Sorry, If my question irritates you

Member Avatar for El Duke
0
162
Member Avatar for Prabakar

When I searched the web, I found an intersting program, I dont think I can explain a bit. But, I would like to share it. It displays my home country thats the most I can say about it! Here goes, [CODE=C]#include<stdio.h> main() { int a,b,c; int count = 1; for …

Member Avatar for Prabakar
0
156
Member Avatar for computers08

test ( 5, 5, 7.3, 'z' ) will work. And, What is your question? >>I need a statement for the function test what statements?

Member Avatar for Prabakar
0
94
Member Avatar for rock9449

Its almost right. line 28: cout << &credit whats the use of printing the variables address

Member Avatar for VernonDozier
0
99
Member Avatar for ddt99999

If, you are using Visual c++, then goto Project-> settings and then to the debug tab. There in the arguments, text box type your commandline arguments, If not visual c++, then search for argument text box. There will be one some where. or if you are running in console <pgm-name> …

Member Avatar for ddt99999
0
103
Member Avatar for shotjase

Its a simple mistake. if (grid[r][c] = 1) = is an assinment operator. == is the relational operator The code is just fine

Member Avatar for Salem
0
95
Member Avatar for amarhp

sample *s, creates a near pointer to the class sample. "new sample" creates an object, and calls the constructor with 0 argument. s->fun1() ; calls function 1. s-> fun2() calls fun2 since functions dont depend on this object because there is no variable used, when objects are created space is …

Member Avatar for amarhp
0
118
Member Avatar for fatasscp

If you say that you dont know the size of the file, then you can use a linked list. get a data using fscanf(), insert it into your list when you find the position. continue until end of file. But if the file is very big, then use some external …

Member Avatar for sacdpathade
0
113
Member Avatar for Aamit

[code=c] #include <stdio.h> #include<string.h> int main () { char firstipadd[20], fname[30] = "D:\\"; FILE *pFile;; pFile = fopen ("D:\\xyz.txt" , "r"); fseek(pFile,169,SEEK_SET); fgets (firstipadd , 14 , pFile); fclose (pFile); strcat ( fname, firstipadd) ; rename ( "D:\\xyz.txt", fname ) ; getchar ( ) ; } [/code] This code is …

Member Avatar for Prabakar
0
355
Member Avatar for Linda1

Well, if dealing with 2-d is your problem, try this. len n = r * c of the matrix. use buble sorting, on matrix[0][0] to matrix[0][n-1]. It will sort, the matrix, left to right & top to bottom And also, in the code, you use, NO_OF_ROWS as a matrix, as …

Member Avatar for Prabakar
0
179
Member Avatar for Motvel

Analytical geomentry, gives variousways to calculate distance. In this case, we can use sqrt( (x1- x2)*(x1-x2) + (y1- y2)*(y1-y2) )

Member Avatar for dmanw100
0
122

The End.