49,757 Topics

Member Avatar for
Member Avatar for Asif_NSU

The following code finds the square root of a number, it runs fine unless you compile with MinGW gcc: [code] #include<stdio.h> #include<stdlib.h> int main(void) { double x0,x1,a; int i; x1 = 1; x0 = 0; printf("\nFind square root of: "); scanf("%lf",&a); for(i = 0; x0 != x1; ++i) { x0 …

Member Avatar for Asif_NSU
1
1K
Member Avatar for vietbong87

hello i need help, i have to input 10 integers and find the maxinum of the numbers. [code] #include <iostream> using namespace std; int main() { const int MAX_NUM_INTEGERS = 10; int integers[0]; int largest = integers[0]; cout << "Enter 10 intergers: "; cin >> integers[i] for (int i=0; i …

Member Avatar for nanodano
0
615
Member Avatar for yuzhang

Consider a line of simple C code: fopen("C:\\project\\test1.dat","r"); it "directs" the program to the directory where it can find the file from which it will read. My question is under what circumstances, I may write fopen("test1.dat","r") instead? Does the program need to be in the same folder / directory as …

Member Avatar for yuzhang
0
288
Member Avatar for DotNetUser

I'm coding in VC++.NET 2003. For a static array of 20 elements, the code below works fine. But, I needed a dynamic array. I decided to use an ArrayList, but came to a compiler error when it couldn't convert from bool to System::Object __gc*. Anyone know how to convert this? …

Member Avatar for Ancient Dragon
0
110
Member Avatar for j1979c

Is there any way to make an .exe file with VS C++ 6.0, that runs on any machine that has/does not have MS VS?:sad: Just want to make a single .cpp file for computer graphics using GLUT into an executable where anyone, especially my examiners to run it by double …

Member Avatar for Ancient Dragon
0
136
Member Avatar for achala

hello, how do i remove elements which are repeated in a list .I cant seem to do it . in this program i am first putting elements into the list ,then searching for a particular element seeing how many times it occurs in the list(count) .i need to display the …

Member Avatar for achala
0
151
Member Avatar for SyxxtySyxx

Hello all, this is my first post and I feel a little bad about asking for help (instead of offering help), but I've reached writer's block. If I formatted this post incorrectly, I apologise... Okay here's what I need to get/have/do... I need to write a c++ program that will …

Member Avatar for Ancient Dragon
0
592
Member Avatar for Treasure5

Hello. I need help in detecting USB Ports in Borland C++ Builder and listing the name of the device connected to each port in a listbox. Your assitance in this regard will be utmost appreciated. Treasure

0
75
Member Avatar for alpha2006

Hi, I am thinking about learning a new language for game development. Which one would you advise me to learn? Visual Basic or C++??? Please give pros and cons. THanks

Member Avatar for Comatose
0
204
Member Avatar for yaoyaolin

Can someone help me with the following quesitons? char m[6]; int *rip[10]; struct george *c[6]; struct mike BigDeal(char *); How to describe in English??? Thanks.

Member Avatar for Dave Sinkula
-1
159
Member Avatar for yaoyaolin

I have the question about this codec. I know sizeof(struct baseball) = 16. what's the sizeof(Yankees)? Also, What will these cout s yield? cout <<Yankees[2].player; cout <<Yankees[2].Bbp->player; cout <<BigPointer+1); [PHP] #include <iostream> using namespace std; int main() { struct baseball { char *Player; int Hrs; float average; struct baseball *Bbp; …

Member Avatar for Ancient Dragon
0
109
Member Avatar for tyczj

i am getting this error "[COLOR="Red"]error C2664: 'bool __thiscall BST::insert(class BST_Node *& ,struct Key)' : cannot convert parameter 1 from 'class BST_Node *' to 'class BST_Node *& ' A reference that is not to 'const' cannot be bound to a non-lvalue[/COLOR]" and i have no ideal why everything looks fine …

Member Avatar for tyczj
0
122
Member Avatar for johnray31

could you please tell me what is wrong with this code it is compiling but a execution error occured i am unable to find that am using devc++ compiler [code] #include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct link { int value; struct link * lchild; struct link *rchild; }node; node *head =NULL; …

Member Avatar for johnray31
0
139
Member Avatar for vietbong87

need help in findin the minimum of these 5 inputs its keeps showin 2 instead of 1... [code] #include <iostream> using namespace std; int findMin(int [], int); int main() { const int MAXELS= 5; int nums[MAXELS] = {2, 18, 1, 27, 16}; cout << "The minimum value is " << …

Member Avatar for vietbong87
0
127
Member Avatar for iamthwee

Hullo, I need help here I can't get this to work. I'm not sure if the code is correct. Any help would be most appreciated. I basically wanna convert a std::string to a const char array. [CODE]#include <string> #include <iostream> void bull(char[]); int main() { std::string Yo_momma = "iz fat"; …

Member Avatar for Jessehk
0
644
Member Avatar for robase

I need some help to do the following Count all spaces written to the output file Count all alphabetic characters in the output file [code]include "stdafx.h" #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("checkIn.dat"); if (myfile.is_open()) { while (! myfile.eof() …

Member Avatar for HackWizz
0
100
Member Avatar for johnray31

hello guys, i have latest version of dev c++ compiler ..is there any best compiler that is specifically made for c language i need it badly and required ur comment plz give me if anybody knows .....

Member Avatar for server_crash
0
533
Member Avatar for maxilt

[code]#include <iostream> #include <fstream> #include <string> #include <stdio.h> #include <stdlib.h> #include <conio.h> using namespace std; #define MAXLENGTH 20 #define WORDLENGTH 20 enum dir { LEFT=0,UPLEFT,UP,UPRIGHT,RIGHT,BOTTOMRIGHT,BOTTOM,BOTTOMLEFT}; enum menu { LOAD=0,SOLVE,CREATE,QUIT }; struct WORD { char word[WORDLENGTH]; int length; int row; int col; dir d; }; typedef struct WORD word; word wordlist[100]; …

Member Avatar for dude543
0
154
Member Avatar for ontrix

hi there im having some problems, im trying to write a simple software sequencer in visual C++ under windows. I have a few problems my first two menus open up fine but the third wont open it just loops on the title menu. The second probelm i have is that …

Member Avatar for Salem
0
107
Member Avatar for achala

hello, am doing a project for my school . am asked to , 1. open a file 2. tokensise the contents and then change the case of all the letters to lower case 3. search for all the words in tat file with another file so there are 2 files …

Member Avatar for achala
0
83
Member Avatar for dark808

Ive been learning C++- for a bout a month and I want to start making simple button press GUI windws that i can use for informating people about things. (I'm in 8th grade so i'm not a math genius yet.:rolleyes:) The problem is that I don't know what I should …

Member Avatar for Lerner
0
95
Member Avatar for potential

guys, please help me... how do i make clrscr() work? my friend told me to include conio.c, but i think that my version of dev-c++ doesn't have that...so i tried downloading conio.c...but the problem is, clrscr() still doesn't work in my pc but it works in my friend's pc...we're both …

Member Avatar for Dave Sinkula
0
2K
Member Avatar for ASH168

HI I NEED TO WRITE A C++ CODE[DEFINTION & DECLARATION] FOR THE NECESSARY COPY CONSTRUCTORS & ASSIGNMENT OPERATORS TO ENSURE THAT A DEEP COPY TAKES PLACE. [code]class CShop { public: CShop(); ~CShop(); private: CEmployeeContainer* m_pEmployees; char* m_strShopName; }; class CEmployeeContainer { public: CEmployeeContainer(); ~CEmployeeContainer(); private: CBoss* m_pBoss; list<string> m_listEmployeeNames; }; …

Member Avatar for Narue
0
139
Member Avatar for huffstat

I have been trying to use the freeware (dll) version of Qcard32 in visual c++6 on a single document program. I cannot get the functions to work or complie properly. I have been reading about using the __declspec (dllexport) and __declspec(dllimport) keywords I feel that if I can get the …

Member Avatar for Ancient Dragon
0
209
Member Avatar for Elleeza

I want to do the following things in a single program 1) Read a name in the form of string from user 2) Convert it into uppercase if the name is in lower case 3) Now i need to open a file which is already exisiting in some other path …

Member Avatar for wwaall2004
0
174
Member Avatar for insider

Hi everybody I have a problem with exception handling. I have a form which includes a TDBGrid and a TDBNavigator. I also have a Paradox 7 format table (attached with TTable object). I want to catch if someone tries to add a tuple with some existing key value. But I …

0
61
Member Avatar for ravinderreddy

want to capture the system idle time. Means if the user did not press any key or did not move the mouse then it is considered as system idle time. I want the code for this in C or C++ on windows operating system. Please help me.

Member Avatar for mohit_mar
0
741
Member Avatar for honeybleak

:confused: HI, I need to create a program which tests whether within a range given by the user, there exists an extreme of quadratic function (y=ax2+bx+c). The parameters (a,b,c) of this function are given by the user. I just started it but I have a problem in completing it. This …

Member Avatar for soxers12
0
469
Member Avatar for mohit_mar

I want to capture the system idle time. Means if the user did not press any key or did not move the mouse then it is considered as system idle time. I want the code for this in C or C++ on windows operating system. Please help me. It's urgent.... …

Member Avatar for Salem
0
272
Member Avatar for Tester99

hi !!! i try to compile program and it follows errors.............Fatal:Access Violation. Program terminated Error: internal failure Fatal:Access Violation. Program terminated If anyone can help me i would be very grateful. Thank you

Member Avatar for Salem
0
173

The End.