161 Posted Topics
Re: > return 1 if c=y and return 0 otherwise for this , you need to declare a function of `int` return type. > function that compares values of 'c' and 'y' just use == operator. if(c==y) return 1; else return 0; | |
Re: what you have done so far , to solve this assignment. nobody will provide assistance until they realize that you did a lot with it. don't forget to post your code here. | |
Re: > Having trouble understanding pointers its not a good way for getting assistance and therefore never forget to specify the specific topic(like pointers with array , const pointer , pointer to pointer , pointer arithmetic etc.) ? one more thing , in your case , you need a tutorial on … | |
Re: > the problem is I dont know which one will be first to make a code. i don't understand what you want to say > the output will be like this; > sample output > monthly sale=15250 > commission=610 > > next output ; > monthly sale=-5 > commission=invalid output … | |
Re: some logical errors are there: change line 45 with this(because there are 2 values then you have set 2 instead of 8) avgt += (low_temp[monthQuarters] + high_temp[monthQuarters]) / 2.0; remove line 46 and place the following after the loop avgp = totalp/4.0; | |
evenafter learning functions , i see a lot new things everyday in functions. its great because it gives the opportunity to learn new things. today , i see a function which have const keyword with function , like this : void fun_name() const{ } i couldn't understand it . would … | |
Re: what does it mean by `c++ executive` ? i haven't heard about this(may be because i am a beginner). | |
Re: to get 36.00% , you need to change the code at line 13 with this: `decPercent = (decX / decCalories)*100` | |
Re: > problem display the unchange array i don't see the code for displaying an array. you should use `cout<<` for displaying i don't know what do you mean by the word unchange. you should declare a pointer variable because i think you wanna play with dynamic array.so try this: int* … | |
Re: we don't do your homeworks , its your duty to complete it. but as a help i can suggest the following structure , you can use to solve your assignments. if(n is even) { //write code to print the table for 2 } else { //write code to print the … | |
I read about pointers and it says that array names can be used as pointer constants and pointers can be used as array names and here is an example that prove the first statement (`array names can be used as pointer constants`) #include<iostream> using namespace std; int main() { int … | |
i want to add child forms in mdi parent form and i done this but the problem is : i have an picture box in the top of MDI form and now here i want is that the child form should load after that picture box and this does not … | |
hello , today i suddenly think about creating an application that has limited uses . i mean after using an application for 30 days , it should not start the application . How can i do that ? i can decide if the day is the last day or not(i … | |
hello , after learning on functions in c++ , i created several functions and now i wanna create a gourp which will have these several functions at a place(i think its done with header file). so, i think if i create a header file and include these all these functions … | |
Re: > I am new with the c++ code, I'm also new , and new user can learn and finally becomes expert.And c++ is very easy to learn. > Write a c++ program that may be use to compute the area of square (area=sideside) or a triangle (area=1/2base*height). i think nobody … | |
Re: here we don't do your homework. you should think more on this problem . And make full use of ifs or switch inside loop. start thinking and writing the code. If you get errors then post your code here and we will try to point out the error. so , … | |
Re: i use getline(cin,name); but problem will still exist until you clear the buffer . write this to clear the buffer : cin.ignore(numeric_limits<streamsize>::max(), '\n'); don't forget to include `<limits>`. please correct me if i'm wrong. | |
Re: Because it cannot refer to itself through its default instance name , for this you have to use `Me` try this: `Me.Textbox1.Text="Hello"` | |
Re: please check your update statement(i will start programming with database very soon but before right now , i am reading Book on SQL). i saw there the correct syntax for update statement is: `UPDATE enroll SET username='" & textbox1.Text & "' where ID=" & _UserId` `,` is used when you … | |
Re: functions are very easy to learn (i recently learned it , except recursion, which today i'll finish).just read [My Tutorial](http://www.daniweb.com/software-development/cpp/tutorials/471863/beginners-tutorial-on-functions) and read the section titled "Argument and return". if you read this tutorial carefully , you'll easily solve it. try to do that with your own efforts , we'll provide … | |
Re: > I need the vb.exe to run on its own, with or without the visual studio. Any suggestion? you need to use package and deployment wizard. It will create installer of it so that you can run it wihout having installed Visual Studio. | |
Re: please show us your efforts to solve this problem . its almost impossible to get assistance if you don't prove what you have done. for this code, you neeed nested looping and print statement of viualbasic and code will be written inside click event of the button. if you are … | |
Re: first off , i don't understand what do you mean by *with calculation in c++* second , you can't get help by asking your question in such a manner. you have to write the entire question includes the problem definition , your efforts, comments and so on. Once you prove … | |
hello today i start writing an application which uses mdi forms(its new to me). and i use the following code:(i set form1=idmdicontainer=true) , is this correct way to create mdi forms ? further i write the code : there i have 2 more forms (form2 and form 3) Private Sub … | |
Re: where you are printing the result ? on form ? or other place holder ? | |
Re: here i am telling the way what i used for it (you can also use predefined forms for this purpose). just create two label and textboxes and one button . on button you can now check for login as follow: if(Txtusername.text="Admin" and Txtpassword.text="Password") msgbox("login successful") else msgbox("Password Invalid") End if … | |
![]() | |
Re: i can't understand , what you want. please explain again in convenient way. | |
Re: while(num!=0) { count++; //here again write code with to get input to `num` variable } System.out.print("Total Integer Numbers="+count); | |
Re: I think that the earlier design was much better. Anyways, this is also good design but i still say that the earlier was very much better. That's my personal opinion. | |
Re: logic seems to be correct if you need the numbers in same line with tabs.use `"\t"` in print statement.if you need to print the number specific times then implement logic like this: int count=1; while(count<=n) { //your code //your code count++; } try this (for printing tabs): `System.out.print(n+"\t");` hope now … | |
Re: > what can(++)and(--) do in c++ source code? ++ increase the variable value by 1. int x=0; cout<<x<<endl; x++; cout<<x; output: 0 1 lets see more about `++.` x++(postfix) ++x(prefix) there is an important difference between postfix and prefix. int x,y=10; x=++y; output: x=11 y=11 int x,y=10; x=y++; output: x=10 … | |
i'm using VS 2008 for window application and made an http web request and it returns result in json([click here for json result](http://www.daniweb.com/api/articles/448095)). I am not much familiar with JSON and also newbie in vb.net . So , i don't have any idea to deserialize the JSON result. would you … | |
I don't know APIs? but i heard of Daniweb API. what it is ? Now i am playing with basic controls of vb.net but i hope after getting about API i'll be able to guess what kind of application i create in vb.net using Daniweb API? So , i won't … | |
Re: `dim` statement is used to decalre one or more variables in vb. one suggestion : Never use of space in Identifiers.Its against the naming rules. | |
Re: > What is WAP? i think OP is newbie and doesn't familiar with daniweb homework policy. He take WAP as Write A Programme , i think. > WAP to print the sum of all the PRIME or EVEN integers in the array and ignore the remaining. if you think that … | |
How to create two circle shape (circle shapes will work as token for 2 players ) in snake and ladder game. I can’t see any control for that ? Here is what I’ve done and what I want : I ve created 100 labels and set their `Text` property 1…..100 … | |
Re: everybody here knows the solution but we won't give you the exact solution. use this as a hint:- if the number is evenly divisible(reminder =0) by 2 then it will be even otherwise odd. the key element in the program is modulus operator. for more information on operator, read my … | |
Re: yes , i see it. its nice. And that make Daniweb a perfect Community. > is only capable of pulling from the past 7 days. So the tab only appears for members who have logged in within that time frame. if we wanna see the activity stream for a user … | |
Re: try like this(not tested but it will give you a hint): for(x=1;x<=9;x++) { for(sp=1;sp<x;sp++) { printf(" "); } printf("%d\n",x); } printf("Merry chirstmas"); this should work. | |
i need database for english words and their meanings so i can create an application for English Dictionary. do you have any database for such requirments ? if you don't have then you can recommend me a link where i can find it . I think that's the important part … | |
Re: i don't understand the exact the problem but i guess that the following will be hint for you. on login button's click dim xvar as boolean = false id=textbox1.text if(id="valid text")then xvar=true end if if (xvar=true) then msgbox("login successful") else msgbox("wrong id") end if however you can do it without … | |
i've 9 button(i've set "" to button text) there and all buttons have almost same code as button1 has and here is the code :- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If (exitgame = 0) Then If (Button1.Text = "") Then Label2.Text = "Active … | |
hello now i am creating an application on what i've learned up to now. so for that i don't wanna show white character over black screen(i don't wanna show white characters in console window ). i want something colorful text. and one more thing i also want for the application … | |
i want to display all possible colors on a form (i am using timer with 500 interval). what logic should be there to display all possible color (i want to display colors which are more closer to each other like red to pink not just red to black). color should … | |
Re: @john we are not here to write code for you. it is very necessary to show us your efforts in order to get assistance. so , post your effors(your code) and then any assistance will be possible. And , don't forget to create a new thread for a question. don't … |
The End.