- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 25
- Posts with Upvotes
- 23
- Upvoting Members
- 21
- Downvotes Received
- 7
- Posts with Downvotes
- 7
- Downvoting Members
- 5
Developer
- Interests
- Music, browsing, fond of arts and antiques
121 Posted Topics
| |
Hello all, I need your help. I trying to change the font of texts displayed in the output of my program. I know that we can use settextstyle() for changing fonts. But there are only four types of fonts( GOTHIC, SANS SERIFF , TRIPLEX , DEFAULT) available. I want to … | |
Re: Nothing is useless or low, For each thing in its place has it's own value. | |
Re: The logic of your program is wrong.A prime number has only two factors,1 and the number itself.In your program odd numbers would be displayed because it is not divisible by 2. 15%2!=0 ,so 15 will be displayed though its not a prime number. Try this one [CODE]int c,d,e=0; for(c=2;c<=300;c++) //excluding … | |
Re: Hello charming--eyes, Do you want a string like "7456" if the integer array a[5] has a[0]=7,a[1]=4,a[2]=5,a[4]=6 ? | |
Re: [B]"The first conquest is yourself. Only after that the world"[/B]-by Pythia-comes in the play written by Terence Mervyn Rattigan. The play is about Alexander the great. | |
Re: Alexander the great and Porus- the king of kings who fought against Alexander the great, are my historical heroes. | |
Re: Maybe the person came to that place after the bomb blast ? | |
Re: Hello ilinan87, You declared [COLOR="black"]double geo=0[/COLOR]. So on multiplying it with the numbers will give zero only. That's why you are not getting the required answer. Initialize [COLOR="Green"]geo[/COLOR] as 1. [CODE]int geomean(int *myarray, int count) { double geo = 1; int k; for(k=0; k < count; k++) { geo = … | |
Re: Add this in the starting of your code, if you have written any. [CODE]#include < stdio.h > int main() { char a[25]={68,79,' ',89,79,85,82,' ',79,87,78,' ',72,79,77,69,87,79,82,75,33}; printf( a ); }[/CODE] ![]() | |
Re: Iam not sure about this solution.. every string is ended with null character or \n.try this block... do {character=getchar(); sentence[counter++]=character; }while(character!='\n'); sentence[counter]='\0'; puts(sentence); | |
Re: All the best! You will definitely do your presentation very well :) Good luck! | |
Re: full can hold only a character. Each time you assign a character to [COLOR="black"]full[/COLOR] the previous character in full gets erased. [URL="http://ee.hawaii.edu/~tep/EE160/Book/chap7/subsection2.1.1.2.html"]this[/URL] might help you. You can give it like this printf( "%s", array ), why go for copying into something. | |
Re: Did you try atleast any one of those ? Show us your effort and we will help you. [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]READ THIS[/URL] | |
Re: can you post the code fully ? Hint: convert the numbers in the character array into integers. This would give you a good start. | |
Re: In the line 1 declare x as int instead of char. It would be better that way. | |
Re: [CODE]getchar(); scanf("%c",&choice1);[/CODE] When you type something for getchar and press enter, the linefeed '\n' goes into the choice1. That is scanf will not prompt the user to enter a character. Instead it will take the last key you pressed for getchar() | |
Re: To have a slash or quote in a string give like this "abc \" " if you give printf("abc \" "); will display abc " Change you string accordingly. Perhaps like this, [CODE]char *args[] = { "--user-agent=\"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0\" ", NULL };[/CODE] Use code … | |
Re: Answers to few questions... 6)[URL="http://msdn.microsoft.com/en-us/library/d9x1s805(v=vs.71).aspx"]#pragma[/URL] 7)This is one way : private members of a class can be accessed by the functions pertaining to that class. 3)[URL="http://www.exforsys.com/tutorials/c-plus-plus/polymorphism-an-introduction.html"]http://www.exforsys.com/tutorials/c-plus-plus/polymorphism-an-introduction.html[/URL] Is google-ing so tough? | |
Re: It's simple. Just break them into segments. hour < 10 ? "0" : " " The hour <10 part tells that if value of hour is less than 10 then 0 will be displayed, if hour is not less than 10 then it displays nothing. If the condition is satisfied … | |
Re: or press alt + F5 or from menu windows->output after running your program to see the output. But the above two posts are the best ones to make output screen wait. | |
Hello all, I was trying to make a folder secure. So when the folder is opened( or any operation is performed on the folder like deletion) an application would open and ask for password. The application i have is an exe file which is dos based and asks for password. … | |
Re: You can download camstudio from [URL="http://camstudio.org"]here[/URL] It records whatever that comes onto the sceen. | |
Re: How do you want to relate all the classes ? and what is the question to these assignments ? use CODE tags | |
Re: [CODE]inputcomputer(a,b,c,char A[][3][3]);[/CODE] You should not declare the array while passing the values because it would give you errors.Declare the array before passing it. [CODE]char A[][3][3]; inputcomputer(a,b,c,A);[/CODE] In the function prototype A is declared as a char *. It can only hold one string. [CODE]void inputcomputer(int*pt1,int*pt2,int*pt3,char *A);[/CODE] Declare A as char … | |
Re: coms[y].name is a string. How can you give cout<<table[coms[y].name] ? It would be right if you give an integer value present in coms. Please post your full code. | |
Re: level.year is not an array. So you cannot give output<<level.year[i] [QUOTE]string types I have Increment well but the int types do not. it says int[int] is invalid for array subscript.[/QUOTE] Increment is different( a++ or ++a,--a,a--). | |
Re: I see that you have used file streams. I beg your pardon if i was wrong about it. But i don't know why you used them as the instructions didn't say about that. | |
Re: I don't know what you mean by "streaming". I assume that you mean file streams. The requirements of your program doesn't state about using file streams. So you can solve the given problem using structures itself. | |
Re: Correction to the code posted by sodabread. There should be ; in line 8 and line 15. [QUOTE]? product is not a data type right? But why was it placed there? help please[/QUOTE] [CODE]product inventory[10]; [/CODE] It's a way to declare objects for a structure. [CODE]struct product { string brand; … | |
Re: On including cube.h and compiling block.h you would get "Type name expected" for block. The cube.h will be compiled first before the compilation of class block. [CODE]class Cube : public Area { Block *blocks[8]=nullptr; int ID; }; [/CODE] Only after that the class block gets compiled. [CODE]class Block : public … | |
Re: Hint: Use two for loops separately for the increasing pattern and two for decreasing pattern. | |
Re: I think the op wants to write to the file. So use ofstream. [CODE]ofstream input; input.open("data.ini", fstream::in | fstream::out | fstream::app); input<<keys; [/CODE] | |
Re: [QUOTE]int ctrLet;[/QUOTE] [QUOTE]if(ctrLet[ctr] > 0) cout << ctrLet[ctr] << " " << alphaLet[ctr] << endl;[/QUOTE] ctrlet is an integer and it is not declared as an array. | |
Re: It shows undefined reference because the functions showFleet, addcar are not "call by reference " functions. | |
Re: You can use system() command to do that. [CODE]system("//copy file.txt folder");[/CODE] | |
Re: Make sure that the icons are not hidden. If nothing works then atlast go for system restore. | |
Re: Can you post the errors ? [CODE]BITMAP* Switch;[/CODE] switch is a keyword. Variables in the name of keywords are not allowed. | |
Re: I couldn't understand your problem. But i assume that you are not getting the right answer sometimes. Try modifying line 1 like this... [CODE]double height_in_feet= 48.00/12.00[/CODE] can you post your code ? | |
Re: Hello niths, Words are separated by spaces. Find where the first space occur. The characters preceding the space will give you the word. Since you want the last word of the string look for the space from the end. >>abellazm You are fast in typing. | |
Re: As waltp said reread the syntax of strcpy(). It should be like this. [CODE]strcpy(string,"HELLO");[/CODE] [COLOR="Green"]strcpy( [/COLOR] /*character array which will hold the text after copying */ , /*string that is to be copied into another array*/[COLOR="Green"] )[/COLOR] ; | |
Re: Hello infiniteloop56, Use separate [COLOR="black"]nested for loops[/COLOR] for top and bottom patterns. Have one nested for loop for the top pattern and have separate nested for loop for the bottom pattern. The one below is for bottom pattern... [CODE]for(c = 0; c < numb; c++) { for(d = numb-1; d … | |
Re: [QUOTE]Does anyone have any idea how to do the others (replacement with a different number of letters, insertion, deletion?[/QUOTE] How about this one... For insertion... 1)First read the line in the file and have it in the string.Insert the string "zzz" in the string that has the text read from … | |
Hi all, Let's us solve some puzzles, Try his one... #1 Rule: You are allowed to move only one digit among any one of the numbers such that it satisfies the equation 101 - 102 = 1 . | |
Re: Hello tubby123, Apart from break and continue you can try this one also, [ICODE]int i,j=1; for(i=1;i<=20 && j!=0;i++) {if(i%3==0) {printf("stop the loop"); j=0; } }[/ICODE] | |
Re: I have seen one UFO, i don't know whether it's really UFO or not it was just a point light that came out in the sky , it traveled in a v-shape and then it vanished. This was about an year ago. That time i felt that Stephen Hawkings theories … |
The End.