49,766 Topics

Member Avatar for
Member Avatar for Lance_Wassing

Well I have a question which could stem some confusion. I'm using C++ to develop some software which i will release as freeware on my website. I'm not new to database programming, however i have only ever worked with xbase and dbase... I would like to start making software with …

Member Avatar for Lance_Wassing
0
122
Member Avatar for c_plus_plus_for
Member Avatar for Ancient Dragon
0
307
Member Avatar for lostandconfuzed

Hi folks! Was wondering if you could help with a problem. I'm supposed to write a function that writes n, n-1, n-2, …, 3, 2, 1. I'm pretty sure I've got it but for some reason I keep getting 0 whenever I run it. It doesn't have to be a …

Member Avatar for Agni
0
100
Member Avatar for rikkie

Hi guys, Could someone point me in the right direction, please? I'm trying to expand my system to accommodate the reservation of consecutive seat numbers. The user is prompted for a row number, seat number and then the amount of consecutive seats he would like to book. For example: The …

Member Avatar for rikkie
0
177
Member Avatar for tlly

Hi everyone.I've got a question on dynamic cast.Dynamic_cast allows us to downcast a data type from one to a more specific one in the same hierarchy. But why not declare the variable we need to the appropriate type during programming time rather than downcasting it at run time? I don't …

Member Avatar for Ancient Dragon
0
357
Member Avatar for zest

I want programming network use language C++, I don't want use langage VC++ but I want use tool VC++. Can I do it? If language C++ do it, can you show me to do this ? I tryed search ebook for it in few weeks, but I can't search it. …

Member Avatar for Ancient Dragon
0
97
Member Avatar for kursist

Hi, I have problem putting a value to 16 bits variable. Here is, how I am doing it. [CODE]typedef unsigned int UINT; typedef UINT* ID_PTR; unsigned short int myclass[5]; const ID_PTR arr16_bit[5] = { (UINT*) &myclass[0], (UINT*) &myclass[1], (UINT*) &myclass[2], (UINT*) &myclass[3], }; [/CODE] Now accessing the myclass like this. …

Member Avatar for kursist
0
92
Member Avatar for Adrian99420

Hi, I created a few window forms and I faced problem when try to link them up. I am able to link up two window form but the problem comes when I tried to link up more than 1 window forms. For example when I want to link up the …

Member Avatar for Nick Evan
0
87
Member Avatar for knewc

*EDIT* INTERPRET! lol....sorry! Write a recursive function array_sum(int *array, int size, int index) that computes the sum of all the elements of the array starting with position "index". Okay thats not too bad..but then he said this for example, if an array A holds the values 5,4,3,2,1 then the call …

Member Avatar for VernonDozier
0
96
Member Avatar for DOPY

Hello i am using a public computer (im just starting out with c++) so i dont have the code on me but i have figured out how to create a text file. what i want to know is when i create it, it places it in the direcotry that my …

Member Avatar for DOPY
0
257
Member Avatar for kse989

The assignment is to, using the given header file, write an implementation file, a menu-driven test file, and a car wash simulator... [B][U]Please see attachment for complete instructions[/U][/B] This is what I have so far, I am having trouble with my print function... I am new to Queues and not …

0
74
Member Avatar for prushik

Basically I want to set up a 3-dimensional array, but I want to dynamically allocate memory for it. Say I read 3 variables from a file, all ints: f, s, and v. i want to allocate memory for array[f][s][v] array is part of a struct How would I go about …

Member Avatar for dougy83
0
88
Member Avatar for Monte

Hey guys i'm taking a c++ class and I know this is easy material but im not sure if a function call can have like m+n or FMAX and stuff. Any help with this would be great thanks. Determine which of the following function calls are invalid and explain why. …

Member Avatar for Ancient Dragon
0
116
Member Avatar for Jacky1

Hi I need help with the remove function in the AVL tree void remove( generic x ); Thank you guys

Member Avatar for Jacky1
0
91
Member Avatar for bigbadowl

I have written the code below to highlight words in quite large documents. Problem is: 1. It needs to be case insensitive, ie: "dog" or "Dog" should match "dog" 2. It currently matches words inside other words Can anyone help? Many thanks [CODE=cplusplus]void highlightTerms(vector<string> finalWords, string *source){ for (int i …

Member Avatar for ivailosp
0
116
Member Avatar for noraantonia

Hello, I just downloaded the latest gd library, unziped it - i downloaded a dll version and a source code version. I have problems whit using it in my msvc application. I will paste here the install specifications for visual c++ users : [code] [I]Instructions from the gd site :[/I] …

Member Avatar for noraantonia
0
610
Member Avatar for Arne Kristoffer

Hello! Is there any way that I could create a loop that will user the content from a text-file and the number of lines? I want to go through a file and look for something, and then I need to use line by line, not char by char. Maybe the …

Member Avatar for Narue
0
77
Member Avatar for CNSK207

Hey I'm new here to these forums and I'm in need of some help with my program. I'm supposed to write a program that will allow the user to enter up to 100 values into an array. The program will then count how many values were entered and display the …

Member Avatar for vmanes
0
115
Member Avatar for Black Magic

Help please, just made this little program, no errors but it does not write any text for me on Dev-C++. [code]#include <iostream> using namespace std; int main() { system("title Array Program."); int myArray[5]; int loop; for (loop = 0; loop > 5; loop++) { cout << "Value for myArray[" << …

Member Avatar for Black Magic
0
86
Member Avatar for skatamatic

I've recently made a pi calculator out of a pretty rediculous algorithm (which is incredible accurate by the way). Unfortunately, C++ doubles can only hold 16 digits of it! I know that's plenty enough for any practical applications, but I want more accuracy! (Call me insane). I'm just looking for …

Member Avatar for skatamatic
0
146
Member Avatar for dkwantee

Hello! The text file is separated by tabs..I have used a struc as below: [CODE]struct scores { int maths int phy; int bio; int chem; int eng; int total; }; struct class { int class_id; char name[50]; }; ifstream fin; fin.open("marks.txt"); char buf[100]; string a; getline(fin,a); char delims[] = "\t"; …

Member Avatar for Lerner
0
518
Member Avatar for buddha527

I was given this code by my professor [CODE] main.cpp #include "home.12.h" int main() { cout << mystery(30) << endl; return SUCCESS; } // end of main //========================================= functions.cpp #include "home.12.h" int search(int first, int last, int n){ int returnValue; cout << "Enter: first = " << first << " …

Member Avatar for buddha527
0
114
Member Avatar for driplet

I use the following code to read data from a txt file: File2Open = "data.dat"; if((In=fopen(File2Open,"rt")) == NULL) { Application->MessageBox("Open data file failed.", NULL, MB_OK); return; } handle = open(File2Open, O_RDONLY); do { Readin1; Readin2; }while(!eof(handle)); Readin1 and Readin2 are two subroutines and consist of many lines of fscanf(In,"%s",&TTT) to …

Member Avatar for Salem
0
109
Member Avatar for tootypegs

Hi, at the moment i have a program that examines a file, does some processing and then outputs the results in a file. Is it posible to examinemultiple files stored in a folder all at once, then output the report files in a seperate folder without having to run my …

Member Avatar for tootypegs
0
112
Member Avatar for computer engW

Hi everone, Today i have a question has two parts and i did what i undrstood.If threr are mistakes ,please tell me. The Question is: [quote]father decided to buy a new vehicle. He paid 20,000 QR in cash and the rest will be paid on settlements as follows:  1500 …

Member Avatar for Black Magic
0
104
Member Avatar for Nemoticchigga

Does anyone know the size of an enum? If i have [CODE]enum foo { YES, NO, MAYBE };[/CODE] is that 1 byte, but if i had 10 enumerations would that be 2 bytes, and so on? Thanks.

Member Avatar for Narue
0
115
Member Avatar for daviddoria

I have 2 classes, Edge and Point. Edge contains Point P1 and Point P2 as private memebers. Edge has accessor functions [code] Point getP1() { return P1; } [/code] and the same for P2. Point has << overloaded - [code] ostream & operator << (ostream &output, Point &p); [/code] I …

Member Avatar for daviddoria
0
133
Member Avatar for amt_muk

Hi What are the basic differences between the methods atol() and strtol()? Regards, Amit

Member Avatar for amt_muk
0
436
Member Avatar for ahjiefreak

Hi, I recently has a C++ code which only run on Fedora Platform. I wanted to run debugging on these code as I came across some unexplainable scenario output. Can anyone suggest how could I use any debugger? I tried to use GNU GDB but then the code I am …

Member Avatar for ahjiefreak
0
242
Member Avatar for heav_yduty

Hi! Sorry, I couldn't find close topic. But maybe somebody can help me with my problem? I create a Word document, and I don't know how to paste the values of my variables in the document. For example, if i have the variable - int sum = 20, how can …

Member Avatar for heav_yduty
0
83

The End.