51,593 Topics

Member Avatar for
Member Avatar for Analogsleeper

Hi all, hoping someone can help me with a bit of code problem. I have this simple C++ program that does some processing on a text file with a bunch of numbers in it. I'm reading the numbers into global structures and then doing some math, then overriting those global …

Member Avatar for Analogsleeper
0
220
Member Avatar for soft_pro

Hello! I write this program form "Robert w.Lafore" 's book(Object Oriented Programming in C++/"functions" chapter/(about "struct circle"))but the "c++builder5" 's compiler message that "UNABLE TO OPEN INCLUDE FILE "BORLACON.H"!!!!! my question is the "borlacon.h" dosen't exists??!!! ;) *1*->How I can fix this program? #include"borlacon.h" #include<conio.h> struct circle { int xCo,yCo; …

Member Avatar for Dave Sinkula
0
214
Member Avatar for immaldor

Hi all. I hope this it not taking up your reading time. I'm new and stuck up at the configuration of Dev-C++ compiler. Before posting, I did search throughout the threads, how to fix/configure the error. I have the snapshot of the error. Please give some steps on how I …

Member Avatar for immaldor
0
137
Member Avatar for CStallion

Hi everyone. I'm new, but I'll be here for a while I think :cheesy: . Here is my code so far. The delays are because I wanted to simulate typing =). [code]// #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main(int nNumberofArgs, char* pszArgs[]) { int i = …

Member Avatar for CStallion
0
113
Member Avatar for Cyripticghost

Hello everyone! I am new to C++ and downloaded Dev-C++ a few hours ago. Is this the right C++ to use? Sometimes I get it to work but sometimes it doesn't. After I typed in the "Hello World" code I compiled it with no errors then when I click run …

Member Avatar for John A
0
163
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
622
Member Avatar for lchamarthi

Hi Everybody! First of all i would like tell my sincere thanks to founder of this site and people sharing the information. I am Newbie to this forum & to C language too.. Now i want to start to learn C. Could any body suggest/send me some quick start & …

Member Avatar for SpS
0
181
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
292
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
137
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
153
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
602
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
208
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
162
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
110
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
125
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
143
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
131
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
649
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
101
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
535
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
157
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
108
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
85
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
98
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
151
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
216
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
175
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
748
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
471
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
288
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
183
Member Avatar for Cool Nanu

Please help me with my problem.I have created a prog in C++ for use in a librar. But there are certain errors in it that i am not able to understand can u please correct this program for me.:rolleyes: This is my "till now" Program. [PHP]#include<stdio.h> #include<conio.h> #include<io.h> #include<fcntl.h> #include<string.h> …

Member Avatar for Cool Nanu
0
214
Member Avatar for Te'DDy

hi, I set an array for making each chat in random that appear for my anagram game.But when it appear some of my char are the same wth other one.So it was useless. EX like that j h o p j n w g n o i e in here …

Member Avatar for iamthwee
0
328
Member Avatar for pabarnes

[COLOR=#000000]Start[/COLOR] [COLOR=#000000]Get all the names of directors from the library into [B]directorlist[/B] [/COLOR] [COLOR=#000000]For each director in the directorlist do steps 4 to 7.[/COLOR] [COLOR=#000000]Start a new page and print “Movies directed by <director name>

Member Avatar for tayspen
0
204
Member Avatar for jasda2

Hello, I'm kinda new to C++ so I need some help. I've written this program and now I need it modified to possibly do the following... Output every 4th letter from the string or Count the occurrences of different letters. This is simple, basic C++ using Microsoft Visual C++ 1.52 …

Member Avatar for Dave Sinkula
0
189
Member Avatar for tydruk

[B]homework(original function names in () )[/B] i have done most of the job allready, but i can't seem to make it do exactelly what the program should. My job is to make a program that asks numbers of busses(10,27,33,36) and the departure(valjus) times and save them into a txt document …

Member Avatar for tydruk
0
204
Member Avatar for Tiffiney_v24

Write an interactive C++ program which prompts the user for 10 integers (one at a time) and stores them into a one dimensional array and prints the result. Then the program takes the array and reverses the order of its elements and prints the reversed array. The following is an …

Member Avatar for Ancient Dragon
0
234
Member Avatar for tyczj

im trying to write a loop so that 8 of each card in a blackjack game is made and i cant get it to work right. it should print out 8 cards for each card made and delete the card if there are already enough of that type of card …

Member Avatar for Lerner
0
108
Member Avatar for yibman

Hi i am a beginner in c# programming. Can anybody tell me what happens in the code lines for this class : [code][COLOR=#0000ff]using [/COLOR][COLOR=#000000]System;[/COLOR] [COLOR=#0000ff]using[/COLOR][COLOR=#000000] System.Collections.Generic;[/COLOR] [COLOR=#0000ff]using[/COLOR][COLOR=#000000] System.Text;[/COLOR] [COLOR=#0000ff]using[/COLOR][COLOR=#000000] Wilson.ORMapper;[/COLOR] [COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] WindowsApplication3.Data[/COLOR] { [COLOR=#0000ff]public[/COLOR] [COLOR=#0000ff]class[/COLOR] LogEntry : DataObject { [COLOR=#0000ff]public[/COLOR] [COLOR=#0000ff]int[/COLOR] referringID; [COLOR=#0000ff]private[/COLOR] [COLOR=#0000ff]string[/COLOR] type; [COLOR=#0000ff]private[/COLOR] DataObject owner; [COLOR=#0000ff]private[/COLOR] [COLOR=#0000ff]string[/COLOR] …

Member Avatar for alc6379
0
112
Member Avatar for Pacer
Member Avatar for amarie

For the descending sort, it only moves the highest number to the correct spot and leaves the other numbers in ascending order. Can anyone tell me what I am doing wrong? [code]#include<iostream.h> #include<cmath> void sortit(int x[], int n) { int temp,i,j; for ( i=0;i<n;i++ ) for ( j=i;j<n;j++ ) if …

Member Avatar for Ancient Dragon
0
175
Member Avatar for tyczj

im trying to make a blackjack game using stacks and lists and i am having a problem with my lists, its not being created and i dont know y? the list is a list of cards for the players and the stack is the deck of cards. [CODE]#include <stack> #include …

Member Avatar for tyczj
0
172
Member Avatar for jlouang

can someone help me i can't seem to find my temperature problem [CODE] /**************************** * functions *****************************/ float c2F(float); float f2C(float); /**************************** * gloabal variables *****************************/ int main () { float inTemp; float newTemp; char inCode; cout << "please enter the code (a 'C' of 'F'): "; cin >> inCode; …

Member Avatar for jlouang
0
112
Member Avatar for Lomas

hi everybody, this is the small c++ program for selection sort using functions. [CODE] #include <iostream> using namespace std; void selectionSort(int numbers[], int array_size); int main () { int number[4]= {20, 10, 40, 30}; selectionSort(number,4); for (int i=0;i<4;i++){ cout<<number[i]<<endl; } system("Pause"); return 0; } void selectionSort(int numbers[], int array_size) { …

Member Avatar for Lerner
0
162
Member Avatar for jack11b

hi im having problems with a doubly linked list. im trying to initialise three names into the list and print them straight off using the list and pointers but cant figure out how. heres what i have already if it could be modified i would greatly appreciate. also please keep …

Member Avatar for Bench
0
177

The End.