51,593 Topics

Member Avatar for
Member Avatar for curls

Hey. I'm having some trouble writing a program. I just begun C++ and don't know the language all that well. I've gotten a small start to the program and could really use some pointers. Here are the program descriptions: Read list of strings and store strings in array of strings. …

Member Avatar for curls
0
193
Member Avatar for jonathanasdf

Hello everyone, I have been visiting this site often as a guest, and I've noticed that it is a very nice community. Now, I have a question myself, and I hope I will be able to get some answers =D Anyways, I started learning C++ about... 2-3 weeks ago. Not …

Member Avatar for jonathanasdf
0
144
Member Avatar for Villanmac

Hi wait (unsigned int delay) wait (unsinged long delay) Whats the difference between the two, i forgot to test this out, basically its part of a delay for seven segemtn display which just cycles through numbers, what would be the difference between the two? thanks for nay help

Member Avatar for vmanes
0
226
Member Avatar for XCal1ber

Hey guys, I just signed up, and I have a question. I am trying to develop a text-based game using Dev C++, and I am trying to get out of the "enter 1 to go east, enter 2 to go north, etc." approach, and am trying to move onto a …

Member Avatar for Narue
0
268
Member Avatar for loushou

Okay... my goal is to start with an array of for instance 5 entries. [CODE]int myArray[5];[/CODE] Then at some point once the array is passed to a function, change the number of entries (example: load a new list of something into the array that has a different number of entries) …

Member Avatar for Narue
0
83
Member Avatar for GSTARRAW

I've been trying to solve this problem,but I failed.I stuck in runtime.I checked my codes and algorithm many times,but I can't figure where the problem is.So I need help!These are my code. [[CODE]//-------------------backTrack.h---------------------------------------------------// #ifndef BACKTRACK #define BACKTRACK #include "Application.h" #include "Position.h" class BackTrack { public: BackTrack (const Application& app); void …

Member Avatar for vijayan121
0
156
Member Avatar for omeralper

i want to implement a binary tree code but i encountered a problem. after i insert some numbers to tree, i couldn't print my numbers except first one or i couldn't insert the numbers except first one. As a result my binary tree doesn't work, it only shows the first(root) …

Member Avatar for sweety0
0
106
Member Avatar for Zinc15

[B]I need help To comment this program for my college work[/B] [CODE]#include <stdio.h> int main() { int a; a = 0; while (a <= 300) { printf("%4d degrees F = %4d degrees C\n", a, (a - 32) * 5 / 9); a = a + 20; } return 0; }[/CODE]

Member Avatar for sweety0
0
74
Member Avatar for sharath61

hi, this is sharath. i m new to .net... i m doing this with c# in window based application can u just guide me i av a pbm, i have several rows stating from A to M, i av put tht in a panel say, in 1 panel i av …

Member Avatar for ujwaliyer
0
100
Member Avatar for Aashath

I have implement a desktop lookup mechanism . Indexing and retrival works fine. But when a file is updated , created or deleted i would like to get the notifaction so that i can update my index . Is there any C++ code availabe for FileSystemWatcher ( which is in …

Member Avatar for vijayan121
0
166
Member Avatar for loushou

So finally after a little waking up i fixed my write to a file in raw binary problem. Now I am trying to load the same data from the file i created. Here is the code I came up with. [CODE]#include <fstream> #include ".\vertexs.h" using namespace std; int LoadVerts(char *s_fName, …

Member Avatar for Duoas
0
111
Member Avatar for CodyOebel

Ok this is what I am wanting to achieve : I have a notepad filled with documentation, and there is some key words in the document that: IF EXIST = is copied from the document and then sent in an email to someone. IF NOT EXIST then the last three …

Member Avatar for Ancient Dragon
0
124
Member Avatar for noodlneck

Hello I'm haveing a problem running my program because i keep getting error C2447: '{' : missing function header (old-style formal list?). Can someone explain to me how to fix this problem? Below is a copy of my program. The program is designed to take three number inputed buy the …

Member Avatar for noodlneck
0
333
Member Avatar for bis student
Member Avatar for JRM
0
132
Member Avatar for starkman

Hello!! I thought I would try and post a problem I have been unable to solve as of yet, though I imagine is easy for experts ;oP I am trying to play around with the mouse functions of Windows, attempting to create a sort of mouse free environment that uses …

Member Avatar for Lerner
0
637
Member Avatar for twoheadedboy

Hello, I'm looking for some help with this short and simple program which I've had problems with for ages. The code for the last solution was apparently right, just didn't work. Anyway here is the latest one: [code]#include <iostream> #include <cmath> using namespace std; int main() { const double dx=0.1; …

Member Avatar for twoheadedboy
0
163
Member Avatar for HowBil

Hey guys, I'm new at this and was wondering if someone could help. I need to calculate the average amount of gallons used per km driven but I don't know how to do it. What do I need to include in my code(below) to include an average? I'd appreciate any …

Member Avatar for Lerner
0
223
Member Avatar for programmingme

Hey Everyone! I have two - hopefully simple - problems that I need help with. I wrote an atm program in c++ that works except for two things... (1) the part where I calculate the balance based on the interest rates for the checkings and savings accounts need to be …

Member Avatar for JRM
0
279
Member Avatar for loushou

I am trying to dump 2 longs, an array of floats and DWORDs, and an array of shorts into a file, USING BINARY out mode. Here is my code: [CODE]#include <windows.h> #include <fstream> #include ".\vertexs.h" using namespace std; int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { OURCUSTOMVERTEX p_verts[5] …

Member Avatar for Duoas
0
101
Member Avatar for olams

Hi, I am writing a program about getting the nth fibonacci number using a class that i have created. I am having problems with it. Any help is greatly appreciated. [code] *void lfib(int a){ int i; eArray x(500), y(500), ans(500); x=y=1; for(i = 1; i<=a; i++){ ans = x + …

Member Avatar for Duoas
0
67
Member Avatar for Flixter

Can someone help me with this task? Write a C++ class that implements all the functions of an ordered dictionary using (2,4) tree??? Needs me for today if someone now somethnig pls send something.

Member Avatar for Narue
0
109
Member Avatar for sasdap

How to integrate python and c++? Can you help by telling the steps to follow?

Member Avatar for sneekula
0
48
Member Avatar for dexter1984

Hi, I did some C++ assignments and was confused about a certain code. [CODE=language] #include <iostream> #include <iomanip> using namespace std; int main() { long result, input, num, count; count = 0; cout << "key in number"; cin >> input; while (input>0) { count++; input /=10; } cout << count; …

Member Avatar for dexter1984
0
95
Member Avatar for hattusili

hi, when i compile my c code at visual C++ 6.0, i got some errors and i can't fix it, please help.. my C file uses the unistd.h and the code is /* This is defined as a real library function to allow autoconf to verify its existence. */ int …

Member Avatar for Salem
0
238
Member Avatar for BlackPelican

I am taking a C++ course, though I am far behind due to my inability to grasp the material. and i must complete 3 projects by Jan. 29. I am having ALOT of trouble implementing the switch statement, and I don't know how to make it loop back the user …

Member Avatar for Salem
0
987
Member Avatar for abar

Hi, I want to have a button in Borland C++ builder 6, for which the background color can be changed. The default TButton available in bcb 6 is wrapper to the windows button & does not have the color property. I went thro the net & found some code for …

Member Avatar for abar
0
305
Member Avatar for kux

here is the thing: i have a constructor that calls a member function, the function throws an exception, i catch the exception in the constructor, free all dynamic allocated variables and then rethrow the exception when i rethrow i get this: Unhandled exception at 0x10210e32 (msvcr80d.dll) in Test.exe: 0xC0000005: Access …

Member Avatar for kux
0
225
Member Avatar for tonyaim83

Hi My input string is as follows :- ABC<-AFC:RFS<-DRP:KLE<-SJS:KLS the required output string should be ABC<-AFC<-DRP<-SJS Means to strip down every string after :(colon) How should i do that kindly help.

Member Avatar for Ancient Dragon
0
57
Member Avatar for Ajuddy

HI, I am still new in this language. i would like some help. i need to write a program that finds an avarage marks of "y" students by rerunning and terminating the program. i need this in a 2 dimensional array to store a roll number and marks of the …

Member Avatar for Agni
0
133
Member Avatar for rash89

hi guyz.i've been working for this assignment in linked list for almost a week now..im complete making the program but i still have problem in deleting elements..in my program when i enter 1,2,3,4 and i want to delete 2..it deletes the 4 not the 2:?: ..how will i solve this?..pls …

Member Avatar for Passmark
0
95
Member Avatar for RohitSahni
Member Avatar for someguy88

Hello I apologise if im posting in the wrong place at all im fairly new to your forums and i was wondering if someone could help me with this bit of code im writing. Its supposed to roll 4 random d6 dice and then minus the smallest roll and print …

Member Avatar for Passmark
0
79
Member Avatar for newbietoC++

I have an assignment in my Advanced C++ class using Visual C++. I have most of it but there is a problem. After each pass it is supposed to display the results. I can get it to display the unsorted list, display the sorted list but not after each pass. …

Member Avatar for Ancient Dragon
0
99
Member Avatar for nivea_jmd

hi i wanted to know how to read the status of RTS/CTS line using ioctl calls....i am programming using c/c++ and linux if someone can post a code snippet or suggest a book for the same...it will be very helpful.... 2. also i will like to know can a windows …

Member Avatar for Passmark
0
154
Member Avatar for x11

hey my win xp sp2 comes up wiht this message arror after booting and the system shuts down on pressing any key .... Error message: the system process 'c:\win\sys32\service.exe' terminated unexpectedly with status code -1 it would be really great if some one can assist me in fixing this!! cheers …

Member Avatar for x11
0
103
Member Avatar for olams

Hello, I wrote a code to calculate the fibonacci number. However, i noticed that it starts acting erratic when i input 1000 i.e it cannot calculate the 1000th fibonacci number. I would appreciate it if you could show me how to make it work. [code] int f(int &n) { if …

Member Avatar for ShawnCplus
0
85
Member Avatar for jarhead741

i'm trying to write a quicksort but my partition is not working properly can some help me please [code=c++] void parttition(int myArray[],int first, int last); void quicksort(int myArray[],int first, int last); void quick( int size) { int myArray[10]; int x; srand((unsigned)time(0)); for (x=0;x<size;x++) { int random_integer = rand()/25; myArray[x]=random_integer; printf("%d\n",myArray[x]); …

Member Avatar for Passmark
0
95
Member Avatar for olams

Hello, Please i really need your help. I am trying writing a code that will delete the last element of the list. However, i keep getting 0 or when i tweak it, i get a message asking me to abort what i am doing. In this code, i append some …

Member Avatar for olams
0
148
Member Avatar for conan19870619
Member Avatar for shankhs

I am a newbie to windows programming environment in c++,I have to make an on-screen keyboard. I dont know how to do draw the exact layout of keyboard in Visual C++. Any help?

Member Avatar for VernonDozier
0
110
Member Avatar for tonyaim83

Hi... My input file is as follows :- A<-B<-C<-D A<-C<-E<-F<-P ....... ..... What i want is to first store the given input as follows :- {{{A,B},{B,C},{C,D}},{{A,C},{C,E},{E,F},{F,P}}} and then make a check if the pair is present in particular subset of a set. For e.g if the user can give index …

Member Avatar for VernonDozier
0
75
Member Avatar for abhi_elementx

This may be a dumb question. But is it possible to use multiple files in a single program without using header files concept. Perhaps maybe using the "extern" keyword.

Member Avatar for abhi_elementx
0
100
Member Avatar for vanalex

Hello everybody! This forum gave the greatest impression so congratulations to you folks who built it. I'm not an expert in c++, i've actually started learning a year ago so i need little help..I have two classes course and student. The course class is : [CODE=c++]class course { private : …

Member Avatar for rkavinash
0
113
Member Avatar for sweety0

hi all this is an algo of finding the no. of times the key occurs in an array.. [code=c++] #include<iostream> using namespace std; int main() { int a[5]={1,2,2,5,6}; int max=2; int counter=0; for(int i=0;i<5;i++) { if(max==a[i]) counter++; } cout<<"the element "<<max<<" appears "<<counter <<" no. of times"; return 0; } …

Member Avatar for sweety0
0
98
Member Avatar for kmaria

i have a window with 2 edit boxes. i want when i put value to the first edit box to start the counter and when i click on the second edit box to stop the timer. thank you and sorry for my english.

Member Avatar for Ancient Dragon
0
105
Member Avatar for seneye

I want to learn to C++ But I don't know how to start to learn it? Is there a program that I can practice it in or something? I just don't even know how to begin learning it?

Member Avatar for HLA91
0
133
Member Avatar for volscolts16

Well another semester has started almost done with all java classes, and now C++ has started. I like it so far it is shorter and somewhat easier code. I have a homework assignment which I have started on, but with just starting C++ not sure where to go. Class meets …

Member Avatar for brk235
0
100
Member Avatar for jimJohnson

I am new to C++ and need help with this output after the debugging.... Type of Ticket Orchestra Mezzanine Balcony Select: Number of Adults: Number of Children: This is what it is supposed to look like and I am confused on multiple issues. All i know is need to use …

Member Avatar for brk235
0
83
Member Avatar for jf404

I've been working on this code for a simulation, but strange things keep happening. The trader object is (int buy, int inf, int t1). The values of buy and inf should only be 0 or 1, but i keep getting ridiculously high and even negative values and I cant see …

Member Avatar for wazzam
0
116
Member Avatar for sheks1

The End.