165 Posted Topics
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 … | |
Re: 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. | |
Re: Ya, and for any other bases you have the formula log a ( base b ) = log a ( base c ) / log b ( base c ) | |
Re: << 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. | |
Re: >>you can save the new data in program A after each step I guess he said program A is not in his hands. | |
Re: 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 … | |
Re: 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 … | |
Re: nice catch stephen84s. Then I guess the only way should be to play with bitwise operator | |
Re: [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 … | |
Re: 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:( | |
Re: Why is that I am not able to understand what you are talking? I was never thought about MAKEFILE :( What is a makefile? | |
Re: 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. … | |
Re: dont use trubo c. If you search this forum you would know why. | |
Re: 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 … | |
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 … | |
Re: 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[] = … | |
Re: 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 … | |
Re: I will say that you have to think the way [B]AD[/B] thinks Edit: Too late | |
Re: [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.:) | |
Re: 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] | |
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 … | |
Re: 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. | |
Re: [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 … | |
Re: Will this work? system ("explorer http\\\\192.168.23.5"); | |
Re: 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 | |
Re: Use a struct on the first hand & since it is c++, its easy to swap a struct. | |
Re: I am learning a lot after I entered this forum. Thanks a lot, and then why so harsh, I am scared reading this. | |
Re: 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 & … | |
Re: 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 | |
Re: 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. | |
Re: 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 … | |
Re: soory, I'll read 1/2 hour later. Got to go. | |
Re: Excuse me, wont the second code make an infinte loop, I mean, 'i' will be less than n the whole time ![]() | |
Re: 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? | |
Re: Teasing questions right. What is the output of this. #include<stdio.h> int main () { printf ( "%f", 10 ) ; return 0 ; } | |
Re: I guess Sliding Snakes of the desert can solve your problem. | |
Re: oops! sorry, wrong thread | |
Re: 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 | |
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 … | |
Re: test ( 5, 5, 7.3, 'z' ) will work. And, What is your question? >>I need a statement for the function test what statements? | |
Re: Its almost right. line 28: cout << &credit whats the use of printing the variables address | |
Re: 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> … | |
Re: Its a simple mistake. if (grid[r][c] = 1) = is an assinment operator. == is the relational operator The code is just fine | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … | |
Re: Analytical geomentry, gives variousways to calculate distance. In this case, we can use sqrt( (x1- x2)*(x1-x2) + (y1- y2)*(y1-y2) ) |
The End.