51,593 Topics
![]() | |
I wrote a program to solve a system of linear equations. It works fine with the VS compiler. But when I try to run it using Cygwin, I get a seg fault(core dumped). But it does not say where the seg fault is. I am using the following commands: to … | |
Hey all, I'm currently struggling a bit with GUI building. What i want is a simple "click the button & a new widget appears" effect. Now how to go about implementing that i dont know. I've thought about storing each instance a widget in a std::vector. Seems a little messy … | |
I don't know where you sould put resources on this website so i'll just post it here. Also, if anyone can find the reason this program crashes occasionally and reply back, i'd be greatful! Thanks in advance. *Reminder: I'm not pro This is a simple(?) program that allows the user … | |
Hello everyone, Im new to this forum and hope you all are doing well. Im currently developing mods for half life 2 (basic changes to game play but more level design stuff) I want to improve my skills and learn everything that I possible can. I really like the programming … | |
if anyone could please help me with the c++ coding of the following:- Write a c++ program that does the following:- Accepts as input n(to be entered at run time and n must be divisible by 3) integers and stores them in a Stack, sort them using any sorting algorithm … | |
Cant seem to find the solution to this although its probably starting me straight in the face. Iv been at this for a few days now,can anyone help me spot the bug? [CODE]// test the bool #include <iostream> using namespace std; main(){ int turn; int var=2; while(var!=1){ cout << "1 … | |
A company pays its employees as Managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage for up to the first 40 hours they work and “time-and-a-half,” i.e., 1.5 times their hourly wage, for overtime hours worked), commission workers (who receive a $250 plus 5.7% … | |
Hey guys, I've got one more thing to ask about. How would I go about sorting by "words" rather than characters. In my program, I "read" strings, not characters and yet if I try to "sort" by words, it ends up just sorting the letters in that word. So "Benny … | |
I'm trying to filter the contents of a vector of type string, based upon a regular expression. NB: I'm using the boost::Regex library So far, I've got the following [CODE] boost::regex r("[A-Z][A-Z]{3}<\\/t|[A-Z]{3}<\\/t|[A-Z\\.]{3}<\\/t"); for(int i = 0; i < vStream.size(); i++){ if(boost::regex_match(vStream[i],r)) cb->Append(vStream[i]); // cb is a combobox for my GUI … | |
Hi, I'm trying to create a quick and small programs that works when you press F9, it should create files on my desktop using "ofstream" from A to Z. I can't get it to run when i put ofstream in a [B]for[/B] cycle. Here is the code to see it … | |
develop a program that can help a person with some calculation that will allow him to decide on how much money he should spend on an expensive item. The program should request four different input data from the user (All are integers): 1- His capital 2- The annual percentage that … | |
I am a student in C++.We undertook a school project to develop a library information system.We are only allowed to use Turbo C++ version 3 compiler.We cannot use ANSI/ISO C++(Not in our syllabus.)The following is my problem: In my project, I have a class books.When the program is first run, … | |
Hi there, I am relatively new to C++ and was hoping someone could provide me with some guidance, I have a .txt file that contains a heap of HTML and I wish to extract a small portion of [B]dynamic[/B] text from differing places. For example: [U] .txt file before filter[/U] … | |
Hello i am quite stumped with a function to print the following results: Start End Number of Primes 1 1000 168 1001 2000 135 2001 3000 127 3001 4000 120 4001 5000 119 5001 6000 114 6001 7000 117 7001 8000 107 8001 9000 110 9001 10000 112 … … … | |
Sory for asking too much about this..But I really need to solve this problem immendiately.. This is just simple,but i dont know why i cant finf whats wrong with my code.. I'm trying to display the price,sale and the to total sale in point form.. like this : TOTAL SALE … | |
This shows how to create, load and access a ListBox. BCX was used to create the original code which was then modified to work with the Dev C++ (really GCC/G++) compiler, compile as a Windows Application. | |
Hi.. I'm wondering how could we make a program that could determine one's age by just entering his or her identification card number.. Is there any function in c++ that we can use?? this is the sample of question... Movies in cinema has ratings to suit ones appropriate age level … | |
I am in desperate need of help! I am having an issue inserting the word into the correct list. Each array index is a letter of the alphabet, and the words need to be put into the correct index according to the first letter of the word. Can I get … | |
Hi.. This is my program for my assignment.. So far,I've succeeded in coding the program but not for the last part.. I still need to find the total sale for this program... and the result at the end suppose to be more or less like this : Total sale : … | |
Hello, I am beginner with c++ programming and I need help with this source. I tried to find a way for getPrintDetails to not print a infomation. //Course: 4002-208 //Author: Joseph Dalpra //Topic: Functions //Name: project4.cpp //Purpose: Using functions to shorten repeated code // Play the game of craps for … | |
I need to have a function like this: if (x == 1){ ... } do some amazing things. I need it to check to see if x == 1 through 380 or more. But I really don't want to waste 4 hours doing this: if (x == 1 || x … | |
So I need to find the highest and lowest for some numbers I am storing into struct [code=c] #include <iostream> #include <string> using namespace std; struct WeatherStation { string StationDesignation; double Temperature; } CA, FL, NY; // EXAMPLE, I WILL ADD A LOOP FOR FL AND NY int main() { … | |
From what I've googled, it seems like symbol reference errors are linking errors.. If I am wrong, please let me know. I'm trying to make a very simple program(DataReader.cpp) that takes inputs from a text file and saves them in a form specified in Data.cpp/Data.h. But I keep getting symbol … | |
I am having an issue inserting the word into the correct list. Whenever I place a loop that loops while the file isn't at the end I get an infinite loop. Can I get some pointers on how to fix this? Here is the text file I am using: I … | |
Hello everyone, I'm new to the forum and new to C++, or any programming for that matter. I've been trying to create suite of 4 functions one of which takes a string and converts it into an integer. I'm aware of the atoi function but we are not supposed to … | |
Hi guys! I have an assignment for my C++ programming course. The deadline is 2009/11/1 ! (I know it's too late, but plzzzz!!) I would really appreciate it if you could help me. The problem is: Write a program which calculates and prints the area and circumference of a circle … | |
Since i am learning c++ myself and only have access to ebooks(no credit card to buy books), i ask a lot of questions so please bear with me. Take a look at the following code:[CODE] //: C04:Cppcheck.cpp // Configures .h & .cpp files to conform to style // standard. Tests … | |
hello, i need ur help.. define a CLASS PERSON TYPE that does: a. set the first name only. b. set the last name only. c. store and set the middle name. d. check whether a given first name is the same as the first name of this person. e.check whether … | |
Hello all, i'm new to C++. I'm struggling to run this simple program.. I created a file called source.cpp that the code below. I have no other files in the same project.. Spec: Windows vista, Visual c++ 2008 compiler, 32bits [CODE]#include <iostream.h> #include <time.h> void main() { char sdate[9]; char … | |
hello..i have homework and wish that i can find help here.. i needed on sunday to be solved.. plz help as much as u can. consider the definition of the following class: class CC { public : CC (); //line 1 CC (int); //line 2 CC(int, int); //line 3 CC(double, … | |
Hello, I am new to C++ programming but not to programming in general. I have coded in VB, Java for a number of years. But C++ is a bit trickier than I expected. I have searched and looked over several threads on here pertaining to tokenizing and char to int, … | |
Hi all, can anyone point me to an offline MINGW installer? I want to fiddle with Eclipse CDT to see how it is doing compared to CodeBlocks. Also offline question: Does Aptana support C++ programming? It is based on eclipse and is found here [url]www.aptana.com[/url] Ahsante sana [Thanks a lot] | |
Hey, I'm studying c++ programming at university at the moment. We've recently moved onto arrays - which I understand mostly. I have no problem displaying information from an already set array, e.g. [CODE]int storage[5] = {1,2,3,4,5};[/CODE] However, I'm having problems when adding my own data to an array within the … | |
Hello Daniweb, This is my first official "help" thread. I'm currently attempting to read a file that has the following code: [CODE]8 split 1 9 1 spare 7 2 10 strike 8 2 spare 6 split 2 7 3 spare 10 strike 10 strike 10 turkey 8 1[/CODE] and have … | |
Hello all; I'm new to this list & C++. I am looking for a windows XP compatible editor (free is best). I tried to download Borlands C++ 5.5 but unable to get the email that is supposed to come (I see others have had the same problems). I'm just trying … | |
I'm working on a project in dev-C++ #include<iostream> #include "Critter.h" #include <time.h> #include<string> using namespace std; size_t strftime(char* ptr, size_t maxsize, const char* format, const struct tm* timeptr); int main() { Critter GetOne; Critter c1; c1 = Critter(0, 1, 2, 3); time_t rawtime; struct tm * timeinfo; char buffer [80]; … | |
any idea how to cunt a pointer, i did some thing like that but doesn't worked ( for (i = 1; i<currentNode; i++)) i've got an error ( comparison between pointer and integer). so any idae how to solve this problem. | |
Hi guys. I am trying to write a program that asks the user how many test scores they have, then reads the test scores, averages them, then displays the average and a pass/fail grade (50+ is a pass), using a seperate function to average the input values. I have been … | |
Here's a function that manually converts an integer to any base between 2 and 36, the parameter list is: [CODE]void toBase( int value, // Integer value to convert char *target, // Pointer to a large enough buffer int base, // Base (from 2 to 36) int fixedDigitCount // The minimum … | |
simple little program from a book. One of the exercises is to modify it to use displayMessage to output the "Welcome" message and the name of the Professor. Problem is everytime I do it the name of the Course and the professor are the same. What am I doing wrong? … | |
Hi, I was wondering if it is possible to connect a C++ program to a MySQL database on Linux Fedroa Core 5 os. It would be great if I could create a program in C++ that allows me to create a completely new database in MySQL, edit, modify, delete and … | |
Not sure this is the best place to post this: I'm an experienced C++ oop developer wanting to develop my own semi-complex website ( e.g. with very nice GUI and graphics in general). I've used Qt for C++ GUIs I'm a newbie to web development, and after researching languages, it … | |
hi ... i am making a program which can handle bank acount system. In which User can MakeDeposite,WithDraw money and CheckRemainingBalance. when user MakeDeposite then a certain amount should be saved and as how much times user MakeDeposit, it should be added in balance amount and as how many times … | |
To write a program that reads a person name in the following format: first name then middle name or initial, and then last name. the program then output the name in the following format: Last_name, First_name , Middle initial. Example the input [B]Mary Average User[/B] should produce output [B]User, Mary … | |
Hi, I am writing a program which needs to extract data from a file. Sample file Adder: 4, yes Mult: 6,yes .... i want to extract this info into a structure { Int interval (4 should be entered here) bool pipeline (if yes then 1 else 0) } i read … | |
This is what I have of my code so far but I cant get it to work right, Can someone help me fix this I need to make a float function that converts celsius to fahrenheit but im not totally sure how to do it I also need to make … | |
Ok so heres my story. Ive done basic programming before with serverside javascript which is not really used but effective when creating small backend databases and its kinda like vb script, so im familiar with basic concepts like funtions, arrays etc Ive been reading some books on C++ and ive … | |
Hey, I am just learning functions. I was wondering if you could tell me why this piece of code is not implementing the 'values' function. [code] #include <iostream> #include <windows.h> #include <string> #include <iomanip> void values(float value1[11]); using namespace std; float value1[11], value2[11]; int main() { cout << setiosflags(ios::fixed) << … | |
template <class T> bool linkedlist_2d<T>::get_data(int row, int col, T & data){ bool bsuccess; //to do the missing implemetation return bsuccess; } //this code is part of other linked_list_2d template <class T> bool linkedlist_2d<T>::update_data(int row, int col, const T data){ bool bsuccess; //to do the missing implemetation return bsuccess; } template … |
The End.