49,766 Topics

Member Avatar for
Member Avatar for dmmckelv

I am new to C++. This is a homework problem. So if anyone gives up their time to help me it is greatly appreciated. I have perfect number program, I can get it to run if all my code is in the main. The assignment requests that I use a …

Member Avatar for Nick Evan
0
1K
Member Avatar for tkud

hello, can somebody help me in learning file i/o in c++? i would be very grateful

Member Avatar for dkalita
0
192
Member Avatar for scantraXx-

Hey guys. These functions are not working together correctly because of the true/false statements. Can someone please show me how I can fix the empty() function to work simultaneously with my other function provided? :S My getSmallest() function will not return the value due to the empty() function.. [code] bool …

Member Avatar for dkalita
0
120
Member Avatar for Der_sed

Ok I need help on this Freshman year project-( so it should involve loops, arrays/strings,fstreams and functions only) A CSV file contains airport info: [QUOTE]ABZ,"Dyce","Aberdeen","Scotland, United Kingdom","GB",57.200000,-2.200000,493,\N,"Aberdeen",2657832,2638360 EDI,"Turnhouse","Edinburgh","Scotland, United Kingdom","GB",55.950000,-3.350000,493,\N,"Edinburgh",2650225,2638360 BXE,"Bakel","Bakel","Senegal","SN",14.916667,-12.908333,569,"Senegal",\N,\N,2245662 MFV,"Accomack County","Melfa","United States","US",13.633333,39.133333,67,"Verenigde Staten",\N,\N,6252001 ADK,"Adak Island Ns","Adak Island","United States","US",51.878056,-176.646111,67,"Verenigde Staten",\N,\N,6252001 LIT,"Adams Field Airport","Little Rock, AR","United States","US",34.729444,-92.224444,67,"Verenigde Staten",\N,5035199,6252001 ADS,"Addison Airport","Dallas","United …

Member Avatar for vmanes
0
114
Member Avatar for qwertymk

This will go faster if I show you what I want to do. [code] class matrix { public: double *x; int clms, rows; matrix(int unknowns) { rows = unknowns; clms = unknowns + 1; x = new double[rows * clms]; } matrix operator = (double a[]) const { matrix tmp(rows); …

Member Avatar for qwertymk
0
103
Member Avatar for F.Jor

Hey all, I'm a computer Eng. student. I do seriously need a graduation project idea so I can start working on it! I've taken these courses: C++ Object Oriented Programming Data Structures Computer Architecture Microprocessor 8085/intel Computer Interface Hardware what I like the most: c++, microprocessors & Hardware. Any ideas …

Member Avatar for Ancient Dragon
0
116
Member Avatar for cbreeze

Hello, I am terribly confused on how to start my most recent programming assignment. I am to use an abstract class (shapeO) to create a child class (animShapeO). The program is supposed to create rectangles and moving them (hypothetically as there are no graphics involved) across the screen and when …

Member Avatar for VernonDozier
0
196
Member Avatar for reese27

This is my code below. If i were to enter 2 3 2 3 3 5 4, i were to get 0 0's 0 1's 2 2's 3 3's 1 4's 1 5's 0 6's 0 7's 0 8's 0 9's #include "std_lib_facilities.h" int main() { int num; vector<int> group; …

Member Avatar for Grn Xtrm
0
100
Member Avatar for andoris

Hey, Im new to this forum, and I have a keylogger. Everything works fine except for the ftp upload function which doesn't work, meaning that the program records the keys etc. but doesn't send the log to the ftp server. Any ideas why? [CODE]#include <windows.h> #include <Winuser.h> #include <string> #include …

Member Avatar for William Hemsworth
0
115
Member Avatar for shaynerossum

I'm trying to allocate memory delete it and then allocate it again with more, less, or the same. I've tried this several different ways, but I don't know how to do it or if it can be done with any similarity to my attempts. In my test program it should …

0
82
Member Avatar for ellimist14

First off let me say please don't tell me another sort to use. I am being forced to use the QuickSort. Anyway I have some code written out and it compiles and runs and messes with the order of the list but does not sort it. I'll post the code …

0
62
Member Avatar for Web_Sailor

Hi, I have done a lot of regex in perl and feel like in no mans land in c++ :) Well I want to parse a tab delimited file and want to print specific fields as per my needs. One more thing the input file may not be sorted and …

Member Avatar for iamthwee
0
249
Member Avatar for hmortensen

Hi all, I'm not sure a allegro questing should e posted in Software Development>C++ but all other allegro questions are in this section, so here goes. Im doing some Genetic Algorithms, and normaly used OpenGL for doing the graphics, but now I reprogramming the GA to run on multicore systems, …

Member Avatar for William Hemsworth
0
127
Member Avatar for HappyOrangutan

The output of the code below is: start Caught One! Ex. #: 1 Caught One! Ex. #: 2 Abnormal Program Termination I don't understand why the exception isn't caught. [CODE]#include <iostream> using namespace std; // Different types of exceptions can be caught. void Xhandler(int test) { try{ if(test) throw test; …

Member Avatar for HappyOrangutan
0
224
Member Avatar for sarvari591

i want solution program for this program...... Given a string and a non-empty substring sub, compute the largest substring which starts and ends with sub and return its length. test cases: strDist("catcowcat", "cat") → 9 strDist("catcowcat", "cow") → 3 strDist("cccatcowcatxx", "cat") → 9

Member Avatar for Ancient Dragon
0
96
Member Avatar for cleonar

Is there an easy way to capture a firefox browser address(url) in c++? I'm trying to check if a page pops up after a click event, the test address is known and static. Any help would be greatly appreciated, thanks!

Member Avatar for marco93
0
146
Member Avatar for Kashaku

Hello. I am a new member of this web site. The reason for joining is that when I experienced some problems , I found most solutions on this website. Sadly, I cannot find all answers to my problems. That's why I am here now and I want to ask you …

Member Avatar for hmortensen
0
2K
Member Avatar for shxrainz

Hi, I currently been given a task to convert C++ program to Vb.Net which I'm not very familiar with c++ because of long time never used it since my university times. Can someone suggest which C++ book or e-book for a good stater and which environment suits best for me. …

Member Avatar for kvprajapati
0
173
Member Avatar for tomtetlaw

In the Quake 4 console, there is a "spawn" command, then you put the class name of what you want to spawn, eg. "spawn weapon_railgun". >Meaning that it tried to construct the weapon_railgun class from this input. If the class that you specify is not one that can be spawned, …

Member Avatar for tomtetlaw
0
71
Member Avatar for rajeevns

Hi all, Please help me in writing a program to find the similarity between two texts and return a percentage value. Code must be efficient . Regards, Raj

Member Avatar for Laiq Ahmed
0
84
Member Avatar for gemgirl1972

Hello All, how can I create a member function for a class that is reading from a txt file, which is reading computer network addresses and names for the addresses. I was guessing they need to be string and 4 ints data type. Example of data.txt file input 111.22.3.3 "green …

Member Avatar for dkalita
0
202
Member Avatar for DrakeMagi

What am i doing wrong. Tadd.h [CODE]#ifndef ADD_H_GUARD #define ADD_H_GUARD int add(int a, int b); #endif[/CODE] Tadd.cpp [CODE]int add(int a, int b) { return a+ b; } [/CODE] Taddmain.cpp [CODE]#include <iostream> #include "Tadd.h" using namespace std; int triple(int x) { return add(x, add(x,x)); } int main() { int xi; xi …

Member Avatar for rajeevns
1
105
Member Avatar for CRz315

Hello Everyone, I just started to program and I'm having a bit difficult with it. Can someone run this code and please explain to me these errors and why they are not compiling. Error 1 error C2228: left of '.setFirstName' must have class/struct/union c:\documents and settings\administrator\my documents\visual studio 2008\projects\projec314p\projec314p\project314p.cpp 71 …

Member Avatar for dkalita
0
95
Member Avatar for rockermonki

I am a total beginner with this, started a couple days ago. I have no idea on how to get numbers in order, I have to have a user enter 3 numbers and put them in order, help is appreciated [CODE]#include <iostream> using std::endl; using std::cin; using std::cout; int main() …

Member Avatar for rockermonki
0
194
Member Avatar for LinuxBoy

Hello, in attached file there is a mistake in code I think, it compiles well under Linux, but whole program show this error: [CODE] [CONFIG] loading file [mapcfgs/map.cfg] [CONFIG] loading file [mapcfgs/] [/CODE] It tries to load conf file twice, I am not hard in C++, but I think the …

0
41
Member Avatar for plobby

Hi -- After lots of searching I cant seem to find an answer (well one that I understand at least..) I want to make the variables wobstacle, waisle, and wturn ONLY numbers where a user cannot input a letter and break the program. I was thinking of something along the …

Member Avatar for mrnutty
0
140
Member Avatar for Towely

I'm trying to compile a program that I created that takes a number and finds its average and reverses it. It's a very simple program, but when I try to compile it with g++, it gives me an error. Why won't it compile? What code is wrong? [CODE] #include <iostream> …

Member Avatar for siddhant3s
0
188
Member Avatar for sfurlow

Sorry about the title of the thread, I was looking at the wrong problem. For our class, we're supposed to get a sentence from a user and output the number of three letter words entered. Here's what I have so far: [CODE]#include <iostream> #include <string> using namespace std; void main() …

Member Avatar for siddhant3s
0
92
Member Avatar for ellimist14

I'm really having trouble spotting where my seg fault might be and I know a fresh set of eyes will help. Basically [code]start_ptr[/code] is the head pointer and [code]start[/code] is initialized to 0 and [code]end[/code] is initialized to the number of nodes in the list. here's the code [code] node …

Member Avatar for ellimist14
0
174
Member Avatar for power_computer

Not necessarily hard I just have a hard time where to exactly inherit the , I have a bass class and 2 separate classes which inherit the base class Lets class base class - Class A Other two classes - Class B and Class C Class A has the following …

Member Avatar for mrnutty
0
142

The End.