165 Posted Topics
Re: You can also use [icode]Shell(<address of exe as String>, AppWinStyle.Hide)[/icode] | |
Re: do you mean... [icode]System.Diagnostics.Process.Start( "winword" )[/icode] ? | |
Re: Yes, return value will be negative or positive or zero. Relearn the basics of strcmp() | |
I have wrote a simple program in c++ that will constantly read a record from a database. Once there is a change in a field the program will open a executable file. An instance of this program or a copy of this program has to run in [B]at least[/B] 80 … | |
I have just installed [URL="http://www.pclinuxos.com/index.php?option=com_ionfiles&Itemid=28"]PCLinuxOS [/URL](698 MB) in one of my hardware partition. My Problem is that I am unable to connect to the internet. And I am not able to figure out the reason. So I have decided to post some screen shots, which may explain my problem better. … | |
Re: Why do you want to convert a character pointer to an integer? Such conversion are normally not done. But the answer is [icode]int final = (int)value_a; [/icode] | |
Re: You can use the Library functions like atoi(), sscanf() | |
Re: [QUOTE=luxs000;663821]c having several commands by using those commands we have to write programes very easily in some times the c commands are doesnot work properly at that time we have to use decission making statments. =========================================================== lux [url]www.sofrware.com[/url][/QUOTE] What commands? When it does not work? | |
Re: I can answer the first question. [code=c]#include<stdio.h> int main() { printf ("\a" ) ; printf ( "Hi This text will not be seen" ) ; printf ( "\rHi this text will be seen ofcourse" ) ; printf ( "\nThe last letter will be modified" ) ; printf ( "\bD" ) … | |
Re: Well, I have made some assumptions since you did not say what it is supposed to do. I modified your code a little:) [CODE=cpp]#include<iostream> #include<string> #define isalpha(a) (((a)>='A' && (a) <= 'Z') ||((a)>='a' && (a) <= 'z')) using namespace std; class HowEasy { public: int pointVal (string); string statement; private: … | |
Re: I don't get it. I too use Turbo C++. I copied the code & run it. It had no problem(No Warning No error). But in Code::Blocks, Since bool was already known I had the error message. And then || operator returns integer as far as I know. returns 1 if … | |
Re: Why not sort the list as you insert the node. It will prove to be very easy | |
Re: Why am I not able to see it? Should I register? Well, Why go all that trouble. Doesn't Dani web allow us attach pictures or any file we want with a max of 10 MB, if my memory doesn't fail me. | |
Re: Perhaps this: [CODE=cpp]#include<iostream> int main () { unsigned long long u40=16825420246llu; unsigned long long u20=3171426llu; unsigned long long prod=u20*u20; double kx; kx=double(u40)/prod; std::cout<< "u40: "<<u40<<" u20: "<< u20 <<" Prod: "<<prod<<" kx: "<<kx; std::cin.get() ; return 0 ; }[/CODE] | |
I have mentioned this before, I have to use turbo c++ in class. [B]Problem:[/B] I wrote the following code & to my surprise the code passed the compilation without any problem. I was even more surprised with the output. I just don't understand whats happening. This code won't compile in … | |
Re: Is there a way - sure. You have to code it. 5.xxxx will become 5 (xxxx/10000) then just find the gcd of xxxx & 10000. Divide either with it & you have what you want. 3 ints representing the float. There could be other ways. | |
Re: You have reffered me but my post is'nt here. So I will take our chat conversation here. I did say fread can be used only with binary mode, but after browsing msdn, I found that the problem is with ftell() and not fread() as I originally mentioned. | |
Re: do you mean equivalent reference variable? | |
Re: Why do you call this a pitfall? They are just general rules in evaluating expressions, Aren't they? I just can't thing of any other way to evaluate these expression. for (5 < -1u) the compiler is bound to return 1. | |
Re: I just want to say one more optimization. Instead of using the regular math::sqrt() function which returns a double if we write our own code we need not give importance to the decimal value hence speeding up the process. Hope this helps:) | |
Re: 1) the overloaded operator << return a reference to the fin object 2) type casting to primitive data type is as follows. [code=cpp]class complex { int r, i ; public : operator int() { return r*r-i*i ; // some conversion to int } complex():r(0), i(0) { } complex ( int … | |
Re: I believe do-while will serve you better than while(). You need not repeat 25 - 29 if you use do-while loop Could you explain how the game works? so that I can think of a solution. | |
Re: I have seen this code before. It was written by Kanetkar in a book dedicated for the turbo c complier. In my first glance I found these. 1) some of the codes are missing. ( initgrraph(), etc which will make a interrupt ) 2) malloc returns a void pointer which … | |
Re: >> g = x ; g has to be least of the 2 numbers rather than simply x for the code to be faster. Why brute force? | |
Re: [QUOTE=Salem;652588]The problem doesn't even need an array, nevermind a sorted one.[/QUOTE] Yes, doesn't need one, but insist on having one. | |
Re: 1)cin reads a array of char until a delimitter like <space> or <new line> is encountered. Thats why the program might have stoped after chaging the first letter. 2)The converstion you've made could be done by math exprestions rather than that many if struct. Hope this helps:) | |
Re: [code=cpp]for ( exp = 0, resultado = 1 ; exp < exponente ; exp++ ) resultado *= base ; cout << " The result is: " << resultado; [/code] Is this what you are looking for? | |
Re: [code=cpp]void squares(int n) { if( n== 1 ) cout << 1 ; else { cout << n*n << " " ;//swap lines 7 & 8 for ascending order squares ( n- 1 ); } }[/code] | |
Re: Array index starts with 0 & there is a total of 8 elements. So, the first no to be checked is (7-0)/2 = [3]. The second is 3+(7-3)/2 = [5]. | |
Re: [QUOTE=aecsant]Foo foo = new Foo().SubFoo(); SubFoo: maybe sub class or independent class, but not method.[/QUOTE] How could this ever be. SubFoo() is a function. Perhaps, it may be a default constructor, but that doesn't mean that it is not a function. A [URL="http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=/com.ibm.xlcpp8l.doc/language/ref/cplr375.htm"]constructor[/URL] is a special [B]function [/B] that will … | |
This is the first forum I have ever become a member. And I am having a good time here. Though its about a month I am having some doubts & I don't even know where to post this. 1) How to make the title of the thread I start to … | |
Re: Considering the first problem, You guys have come up with brilliant answers which is taking me more than 20 minutes to understand. Did not someone gave a link to an easier answer so that a novice like me could understand. Add all the element in the array subtract 1000 * … | |
Re: You can make your program to [URL="http://www.daniweb.com/forums/thread118547.html"]sleep[/URL] This [URL="http://cc.byexamples.com/20070408/non-blocking-user-input-in-loop-without-ncurses/"]link[/URL] may be useful | |
Re: [URL="http://msdn.microsoft.com/en-us/library/ms646260(VS.85).aspx"]mouse_event()[/URL] | |
Re: I have read about Object Serialization in my JAVA book. Could it be possible with C++? | |
Re: My guess: 1)The function checks whether the integer a is divisible by 8. 2)The use of new which is not an operator in c but in c++. | |
Re: [QUOTE=ArkM;647449]Sorry, but the original program has exactly the same effect: see do-while loop in the original post...[/QUOTE] May be the original program is [B]supposed [/B]to have the same effect | |
Re: Try, [icode]system ( "start firefox" ) ;[/icode] | |
Re: [QUOTE=VernonDozier;644834]In Java, as far as I know, you can't have an array start in the MIDDLE of another array like you can in C++. So in this case in Java you'd have to create three arrays and set aside separate memory for three arrays and do a copy from the … | |
| |
Re: Not long before did a similar thread arise. If you want to hide a window then you should use WIN32 rather than console as far as I know. | |
| |
Re: I don't have a turbo c compiler at home, though I am forced to use it in college. Is it the case with you too? If not, the 32 bit world offers better ways to do everything. I had a glance of your code & I want to say something … | |
Re: 1) Don't use void main 2) Don't use Turbo C++ 3) If it is a must to use Turbo C++, try getpass() or write one on your one to simulate it. Its ain't difficult. | |
Re: Sorry for stealing others thread. <<And u should know what is ur target hardware(uProccessor). before proceeding What does this mean? I am so dumb that I don't understand. EDIT: I ask this because I know very little about OS. WinXP works well with various hardware configuration, So is not an … | |
Re: [QUOTE=titaniumdecoy;641881]How about this: [icode]char *ns = malloc(l * sizeof(*ns));[/icode][/QUOTE] Great! I Did not get it on the first look though | |
[B]My Problem:[/B] I have lots of virus & Trojan horses in my Pen drive. I don't have any valuable data though. If I plug in the drive in my USB port, the viruses do something & I loose my internet connectivity & it also occupies more space memory. Without knowing … | |
Re: well, if k = 10 or 11 after 1st iteration it becomes 5 then 2 then 1 and then 0 to exit. I guess stephen said that this halving occurs once every iteration EDIT: Too late | |
Re: It would be easier for others to find the problem if you post your code or else people will be forced to guess like [B]Ancient Dragon[/B] |
The End.