Search Results

Showing results 1 to 40 of 114
Search took 0.01 seconds.
Search: Posts Made By: zhelih
Forum: C Jan 7th, 2009
Replies: 10
Views: 746
Posted By zhelih
#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++)
{
Forum: C++ May 9th, 2008
Replies: 3
Views: 450
Posted By zhelih
I see that the problem is little but the code is huge and unrecognisable....
Forum: C++ May 9th, 2008
Replies: 3
Views: 865
Posted By zhelih
Maybe Lenght+1? What compiler system do you use?
Forum: C++ Apr 11th, 2008
Replies: 6
Views: 2,700
Posted By zhelih
Forum: C++ Mar 7th, 2008
Replies: 2
Views: 472
Posted By zhelih
I think that you should try to put template<class TYPE> before EVERY function which is uses TYPE.
KTYPE analogical.
Forum: C++ Mar 6th, 2008
Replies: 1
Views: 1,160
Posted By zhelih
Have an idea that you have not included headers. Maybe you typed class name incorrectly.
Forum: C Mar 4th, 2008
Replies: 2
Views: 710
Posted By zhelih
No capital letter in void:


void powerArgs(int *parmA, int *parmB)
{
int temp = *parmA;
*parmA = *parmB;
*parmB = temp;
}
Forum: C++ Mar 4th, 2008
Replies: 1
Views: 416
Posted By zhelih
Maybe you should set a type to parmA & parmB:


void divideArgs(int *parmA, int *parmB){
int temp = *parmA;
*parmA = *parmB;
*parmB = temp;
}
Forum: C++ Mar 4th, 2008
Replies: 5
Views: 2,584
Posted By zhelih
Forum: C++ Mar 4th, 2008
Replies: 1
Views: 2,128
Posted By zhelih
int *temp = *parmA;
*parmA = *parmB;
*parmB = temp;


Forget pointer with temp.
Forum: C++ Mar 4th, 2008
Replies: 5
Views: 2,584
Posted By zhelih
Definition:

BOOL SetFileAttributes(LPCTSTR lpFileName, DWORD dwFileAttributes);


dwFileAttributes can take these parametres:

FILE_ATTRIBUTE_ARCHIVE
FILE_ATTRIBUTE_COMPRESSED...
Forum: C++ Mar 3rd, 2008
Replies: 10
Views: 837
Posted By zhelih
What is oyur OS and compiler?
Forum: C++ Mar 3rd, 2008
Replies: 10
Views: 837
Posted By zhelih
Graphic or text mode?
Forum: C Mar 3rd, 2008
Replies: 2
Views: 495
Posted By zhelih
Try:

for (x = integer1;integer1 < integer2;integer1++);
{
sum += integer1;
}


You should add numbers to sum, so take a sheet of papper and look what you are doing.
Forum: C Feb 27th, 2008
Replies: 8
Views: 1,466
Posted By zhelih
You should anything about how to wrogramming matrixes. WaltP is right, we don't write programmes for nothing.
Forum: C Feb 27th, 2008
Replies: 7
Views: 572
Posted By zhelih
Post what you have done. Do you even know how to write programmes?
Forum: C Feb 27th, 2008
Replies: 4
Views: 730
Posted By zhelih
Look for this

Individual **temp_;

temp_=(Individual **)malloc(sizeof(Individual)*5);


malloc return a pointer, not double pointer. So you must do memmory allocation in the loop. Better to...
Forum: C++ Feb 27th, 2008
Replies: 4
Views: 1,184
Posted By zhelih
#include "stub.h"
int main()
{
int x;
int sum = 0;
int num1=1;//Just init previous 3 numbers
int num2=2;
int num3=3;

do
Forum: C Feb 27th, 2008
Replies: 2
Views: 648
Posted By zhelih
Here is a simple one. I can't write without classes, anyway.


#include <iostream>

struct listelem {
char data;//any type here
listelem* next;
};
Forum: C Feb 27th, 2008
Replies: 2
Views: 511
Posted By zhelih
You are posting your code twice. With wich I should work?(interesting)
Forum: C Feb 27th, 2008
Replies: 3
Views: 885
Posted By zhelih
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...
Forum: C++ Feb 26th, 2008
Replies: 8
Views: 1,783
Posted By zhelih
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.
Forum: C++ Feb 21st, 2008
Replies: 5
Views: 601
Posted By zhelih
Ok. Here is the code.

#include <iostream>
int main() {
int i;
int number=1;
char charachter;

cout<<"Please enter a charachter: ";cin<<charachter;
cout<<"\nPlease enter a...
Forum: C++ Feb 21st, 2008
Replies: 5
Views: 601
Posted By zhelih
Post what you have done and we will see and correct. I won't do your homework.
Forum: C++ Feb 21st, 2008
Replies: 8
Views: 2,154
Posted By zhelih
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....
Forum: C++ Feb 15th, 2008
Replies: 26
Views: 3,791
Posted By zhelih
// reading a text file
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main () {
char line[100];
string words[10];
int i=0;
Forum: C++ Feb 15th, 2008
Replies: 26
Views: 3,791
Posted By zhelih
Try that, i think it is OK:
// reading a text file
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main () {
string lines[10];
char word[10];
Forum: C++ Feb 15th, 2008
Replies: 8
Views: 1,699
Posted By zhelih
Type in the end of main cout<<val;
If it doesn't help use getch() from conio.h
Forum: C++ Feb 15th, 2008
Replies: 9
Views: 897
Posted By zhelih
Of corse it won't. You shoul not return the val in main you should use cout<<val;
Forum: C++ Feb 15th, 2008
Replies: 26
Views: 3,791
Posted By zhelih
I've typed some code. Try it.

// reading a text file
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main () {
char line[100];
Forum: C++ Feb 15th, 2008
Replies: 7
Views: 821
Posted By zhelih
It is very big mistake to write printf(c);
Correct is printf("%c", c);.
Remember the definition:
printf(argument, ...);
Forum: C++ Feb 15th, 2008
Replies: 9
Views: 897
Posted By zhelih
You must call switch in some fucntion, it is an operator not a function.
E.g.

int foo(char c) {
switch(c){
case 'B':return 0;break;
case 'N':return 1;break;
case 'R':return 2;break;...
Forum: C++ Feb 15th, 2008
Replies: 2
Views: 1,109
Posted By zhelih
First write in your C file

#pragma comment(lib, "library_name")

where library_name is a name of your library file.
These errors can be produced, that your library doesn't have functions and...
Forum: C++ Feb 13th, 2008
Replies: 1
Views: 1,541
Posted By zhelih
There is no way to mix .lib and .dll files between different platforms and compilers.
Forum: C Feb 13th, 2008
Replies: 3
Views: 742
Posted By zhelih
If you do just simple equals and smth like that just do

char c;
int i;
i = int(c);
Forum: C++ Feb 13th, 2008
Replies: 4
Views: 1,815
Posted By zhelih
I correct your VERY simple syntax mistake.
Here is correct code:


#include <iostream>
#include "point.h"

using namespace std;

void rotate(point &p);
Forum: C++ Feb 13th, 2008
Replies: 10
Views: 1,362
Posted By zhelih
case 'R':
case 'r':
/*blablabla*/
break;


Please put break ok?
Forum: C Feb 13th, 2008
Replies: 4
Views: 2,152
Posted By zhelih
Is is hardware independent. Give me OS, may be I know some. But not for Mac, sorry.
Forum: C++ Feb 12th, 2008
Replies: 25
Views: 5,555
Posted By zhelih
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
const int max_len = 1000;

enum boolean {false, true};
enum {EMPTY = -1, FULL = max_len - 1};
Forum: C++ Feb 12th, 2008
Replies: 25
Views: 5,555
Posted By zhelih
This is really OOP with C++. You can make this trick with numbers, strings, doubles, another classes and what you want. Really it is a standart problem. Is it works properly?
Showing results 1 to 40 of 114

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC