- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 3
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 4
An apple a day keeps the doctor away.
Don't make me angry )
- PC Specs
- Pentium 4 3.2 Ghz 1 Gb Memmory 200 Gb hard drive NVIDIA GefForce 6600GT
72 Posted Topics
Re: [CODE=C++] ... void selsort(int AR[],int size) { int small,pos,tmp,i; for(int i=0;i<size;i++) { .... [/CODE] if you declared i before, you don't need to do it in the loop. [CODE=C++] ... void selsort(int AR[],int size) { int small,pos,tmp; for(int i=0;i<size;i++) { ... [/CODE] Hope You'll find this information helpful. | |
Re: [QUOTE=kashmir323;509106]Is there a C++ command that restarts the application. The program I'm making is just a console application that acts like a calculator. But once you enter your number and press enter you have to close the console and re-open it to find another number. [CODE] int yes = ; … | |
Re: Have you put [CODE=C++] template <class T> class Image { }; [/CODE] And where is Image.hpp? | |
Re: I wrote you code on Visual C++ 6.0 and it works. Use this Compiler )) | |
Re: Really it is doing with int 21h in MS-DOS. I don't know how right now but if you want I'll review asap. | |
Re: [QUOTE=gcardonav;529897]Hello guys You rookie here. been trying to run a code but I am getting this weird error that I have not seen before. I have attached a copy of the error and the part of the code it refers to. Thanks for your help GCard [inlinecode]1>------ Build started: Project: … | |
Re: [code=C++] #include<stdio.h> #include<conio.h> int main(void) { int row=0,col=0,sp=0,b,mid=1,st=71,end=64; //clrscr(); int column_num=0; for (row=1;row<=7;row++) { for(col=65;col<=st;col++) { printf("%c ",col); } for(b=1;b<mid;b++) { printf(" "); } for(sp=70;sp>end;sp--) { printf("%c ",sp-column_num);//start with less symbol } st--; mid+=2; column_num++; end++; printf("\n\n"); } getche(); return 1; } [/code] Your code is absolutely unreadable but I … | |
Re: Standart solution is stack. Continue? | |
Re: I see that the problem is little but the code is huge and unrecognisable.... | |
Re: Maybe Lenght+1? What compiler system do you use? | |
Re: I think that you should try to put template<class TYPE> before EVERY function which is uses TYPE. KTYPE analogical. | |
Re: Have an idea that you have not included headers. Maybe you typed class name incorrectly. | |
Re: No capital letter in void: [CODE=C++] void powerArgs(int *parmA, int *parmB) { int temp = *parmA; *parmA = *parmB; *parmB = temp; } [/CODE] | |
Re: [QUOTE=cosmos22;552066]Hi. (I am using Windows XP) I would like to know how you can use the function SetFileAttributes to hide a file or folder, I would also like to know about the declarations associated with this function. I would like to use this to develop a program that hides program … | |
Re: Maybe you should set a type to parmA & parmB: [CODE=C++] void divideArgs(int *parmA, int *parmB){ int temp = *parmA; *parmA = *parmB; *parmB = temp; } [/CODE] | |
Re: [CODE=C++]int *temp = *parmA; *parmA = *parmB; *parmB = temp; [/CODE] Forget pointer with temp. | |
Re: Try: [CODE=C]for (x = integer1;integer1 < integer2;integer1++); { sum += integer1; } [/CODE] You should add numbers to sum, so take a sheet of papper and look what you are doing. | |
Re: Look for this [CODE=C] Individual **temp_; temp_=(Individual **)malloc(sizeof(Individual)*5); [/CODE] malloc return a pointer, not double pointer. So you must do memmory allocation in the loop. Better to use C++.(I think) | |
Re: You should anything about how to wrogramming matrixes. WaltP is right, we don't write programmes for nothing. | |
Re: Post what you have done. Do you even know how to write programmes? | |
Re: [QUOTE=sfurlow2;546616]I have another question for my homework. Here is the problem: Keep inputting numbers from the user until the user enters a 0. After each number, print a "running average". That is, print the average of the last three numbers entered. Be careful how you handle the first two numbers … | |
Re: It is very big mistake to write [CODE=C++]printf(c);[/CODE] Correct is [CODE=C++]printf("%c", c);[/CODE]. Remember the definition: [CODE=C++]printf(argument, ...);[/CODE] | |
Re: There are a lot of syntax errors in your code. You forget to put ' ; '. case77 is not correct to. Maybe ou want case 77 (with space). The last is that you use goto and it is very bad style so I can't look for running your code. | |
Re: [QUOTE=jessel;546417]hello sir i'm a new user,i just want to ask if you have sample programs which deals on linked list....if possible not the add.edit,delete program[/QUOTE] Here is a simple one. I can't write without classes, anyway. [CODE=С++] #include <iostream> struct listelem { char data;//any type here listelem* next; }; class … | |
Re: You are posting your code twice. With wich I should work?(interesting) | |
Re: You thing that for (x = 0; x < 2000000000; x++) will work quickly??? Mad boy. If you start this loop without any operations it will be VERY long.... | |
![]() | Re: Post what you have done and we will see and correct. I won't do your homework. |
Re: You must call switch in some fucntion, it is an operator not a function. E.g. [CODE=C++] int foo(char c) { switch(c){ case 'B':return 0;break; case 'N':return 1;break; case 'R':return 2;break; case 'O':return 3;break; case 'Y':return 4;break; case 'G':return 5;break; case 'E':return 6;break; case 'V':return 7;break; case 'A':return 8;break; case 'W':return … |
The End.