49,761 Topics

Member Avatar for
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
95
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
88
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
84
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
93
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
240
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
86
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
114
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
89
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
115
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
604
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
112
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
83
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
144
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
514
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
110
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
106
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
110
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
101
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
114
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
132
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
431
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
230
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
82
Member Avatar for Black Magic

Hi, im just bored so was mucking around on Dev-C++ and then was wondering - how could i make it so my program said a random sentance, like if i defined loads, and it said one at random. Could you help :).

Member Avatar for Ancient Dragon
0
79
Member Avatar for allialli

I have a class assignment of writing a program that: Start with the following program code. Write the function called "increment" which takes one integer parameter and returns that value plus one. [code=cplusplus] #include #include using namespace std; // YOUR FUNCTION GOES HERE! int main() { int input; string keepGoing; …

Member Avatar for bugmenot
0
243
Member Avatar for computer engW

Hi ; I know how to solve the same problem if i have limit numbers ,but here i have n intergers .How can the compiler understanst me when i need n integers ,like this question: [COLOR="Red"]Write a program that takes an n number of integers and calculates their average.[/COLOR] Using …

Member Avatar for computer engW
0
88
Member Avatar for digital_ice7

why cant it work properly??? [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ ofstream out;//create output stream int acc_num[10]; for(int x=0;x<10;x++) acc_num[x] = rand()%10; //generate account number char acc_file[600]; for(int x=0;x<10;x++) acc_file[x] = acc_num[x] + '0'; out.open(acc_file, ios::out);//create & open output file out << "PACKAGE ID: "; …

Member Avatar for Nick Evan
0
105
Member Avatar for Suraine

i figure out that srand() and rand() are not quite good in creating a random number. for: [code]while(true){ int x = 0; srand((unsigned)x); int r = random(); cout<<r<<endl; }[/code] It gives back the same number. Am I doing something wrong? If not, is there anywhere that we can create our …

Member Avatar for vmanes
0
82

The End.