51,593 Topics

Member Avatar for
Member Avatar for ravenrider

Hi guys I have been trying to figure out the problem with this program but i couldn't. my program basically crahes everythime I run and I get a seg fault. I tured in as is, but for learning purposes I want to know what's wrong with and how I should …

Member Avatar for mrnutty
0
111
Member Avatar for NinjaLink

I need help trying to convert a postfix expression to Infix. I have tried to search books and internet material to help me take on this task but no luck. Below is what I created, but I know it is far from right which is why I appreciate if someone …

0
91
Member Avatar for infern0

Hi, I'm having trouble writing a program that asks the user 3 questions.(3 possible answers for each) I am using a string to remember all the answers with a getline(cin,answer) statement. My problem is the first two questions have choices for the answers that can be the same such as …

Member Avatar for mrnutty
0
117
Member Avatar for bpt0004

Hi everyone this is my first post, i've been browsing for awhile and finally decided to join. I'm having trouble with an assignment i have in class. I need to calculate the euclidean distance between two 2d vector. The function takes in two 2d vectors of integers. I'm also having …

Member Avatar for bpt0004
0
2K
Member Avatar for chaybird001

I am doing a homework assignment for c++. I am able to get my program to run, but I don't know how to modify it for my next assignment. Here is the question. Modify the program so that various comments are printed for each correct answer and each incorrect answer …

Member Avatar for chaybird001
0
206
Member Avatar for power_computer

As seen in my previous post I had a problem with some code dealing with linking a template class, I emailed my professor and the g++ compiler cannot handle the seperate compilation of template classes. So now im stuck with no compiler, in labs we use the CC compiler with …

Member Avatar for power_computer
0
159
Member Avatar for s11049151

Hi Friends, Can you please help me write 3 functions in C++. It's based on a 2 dimensional linked-list The 3 functions that i have left to write are: [B]1.get_data: If data retrieval is successful return true otherwise return false. 2. update_data: This function updates the data located in the …

Member Avatar for Labby Tisha
0
569
Member Avatar for tina05

somebory can tell me how to swap two colum of the two dimentional array that with pointer this is the run I did but do not work I was in function swap 0 0x11 0 sh: pause: command not found I was in destructor *** glibc detected *** ./a.out: free(): …

0
43
Member Avatar for power_computer

I currently have a template class, another class that is passed as the parameter to the template and a driver and I am getting these errors, I have no clue what the problem is. Also I have another issue with this project I need to sort out which is insert …

Member Avatar for power_computer
0
263
Member Avatar for spookyfish

Im tasked with developing a simple blackjack program for a class. The program I have currently compiles and runs but it isnt paying out properly. A blackjack (21) should pay out 1.5*the wager, but it is doing it more than it should. Here is the code I have. [CODE] #include …

Member Avatar for spookyfish
0
6K
Member Avatar for gretty

Hello I have 2 ways to delete a linked list, which one is correct? If I have this linked list: [QUOTE] list = 1 - 2 - 3- 4 [/QUOTE] Which function will delete list correctly? 1. [CODE] void destroy(node * & list) { while (list != NULL) { delete …

Member Avatar for gretty
0
80
Member Avatar for vitvar

Hi i am trying to write a function in C which will print a substring oout of a string in loop with a token seperator. For example i have a file which contains the following lines aaaaa bbbbb ccccc ddddd i have to read each line and then copy to …

Member Avatar for vitvar
0
197
Member Avatar for avi_2009

Hi Guys: I am trying to build a simple application to query a REST web service. I have developed a perl script and its working fine. I have also developed a java app which does the same thing. Just wondering if C++ can be used for it. I did not …

Member Avatar for mahatmagaga
0
174
Member Avatar for darkpeakjim

Hey guys, I'm reading data from a text file into a vector of strings and would like to pass these strings as parameters to a function. To be clear, I don't want to pass the actual strings as parameters, but the variable with the name which corresponds to the contents …

Member Avatar for darkpeakjim
0
89
Member Avatar for 0xe9

Hey, is it possible to package a C++ an application in vs2008? There is no publish option that i can see like there is if you're developing in C#. The problem i'm having is every time i copy my exe file from the release folder, then run it on a …

0
43
Member Avatar for poopynoob

I am trying to read the value of memory address using c++. For example, how can I read the value contained in "00B12318"? I have tried: [CODE]int value; 00B12318 = &value; cout << value;[/CODE] But sadly it doesnt work. Please help! THank you :(

Member Avatar for poopynoob
0
96
Member Avatar for kadji.kahn

I was asked "This program should calculate which of four company divisions had the highest sales for the last year. The program should ask for the annual sales for the four divisions. The function should calculate which division has the highest amount in sales and return that amount to the …

Member Avatar for kadji.kahn
0
149
Member Avatar for banks2140

I need help with my programming assignment which states A mail-order house sells five different products whose retail prices are as follows: Product Price 1 $2.98; 2 $4.50; 3 $9.98; 4 $4.49; 5 $6.87. Write a C++ program that reads a series of pairs of numbers as follows: a) Product …

Member Avatar for restrictment
0
107
Member Avatar for PDB1982

I trying to create a program that deals with money, and have it all figured out except one portion...I can't get all the decimals to have a monetary look, meaning only two decimal places. I know I can setprecision(2), and that would work for most numbers, but what if the …

Member Avatar for restrictment
0
113
Member Avatar for walter clark

The clock() function works fine in Visual C++ Version 6. I used it for evaluating how many milliseconds certain functions needed. But with Version 8 it won't let me use time.h the library that holds clock(). Naturally the error is unreadable, but there's hundreds of them and its obviously complaining …

Member Avatar for walter clark
0
112
Member Avatar for Poopster01

this is the simple problem I'm working on. A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period …

Member Avatar for Poopster01
0
155
Member Avatar for NinjaLink

I had another thread before this one, but I felt that it was getting too long. Current problem: My operator== is not working properly in my program. I have done some things in my function, but I don't think it is "completely right". My program compiles fine and the output …

Member Avatar for Tom Gunn
0
1K
Member Avatar for sexyzebra19

Hi, I've tried to make a program that inputs two 3D vectors and then calculates various norms of the first vector, and the dot product and addition of both vectors. My code is working fine when everything is put into the main, however I wanted to create some functions to …

Member Avatar for sexyzebra19
0
99
Member Avatar for Rastafari

hi, I have a program that compresses a file but for some reason my output file comes up empty every single time ...I dont get it . can some body tell me what i might be overlooking The sample input file looks like this ..GGGGGG...OOOOOOOO...OOOOOOOO...DDDDDD and my function has to …

0
81
Member Avatar for salmanoreen66

Assignment Write a C++ program to implement employee directory, which will let the organization to perform the following functions: 1) Insert the record of new employee 2) Delete the record of an existing employee 3) Find the record of an existing employee 4) Display Report Following information of each employee …

Member Avatar for ellimist14
0
167
Member Avatar for umarabbas
Member Avatar for SerenaG

I am a beginner at programming and dont understand the difference between get.cin( ) and getline ('\n') ???

Member Avatar for Tom Gunn
0
54
Member Avatar for kadji.kahn

I was asked "This program asks for a series of five test scores and calculates the average score in a function. The function should receive the total of the five scores as an argument and return the average of the five scores. The program should not accept scores less than …

Member Avatar for cgeier
0
153
Member Avatar for UKmason

********************************************************************************** Write a float function that will have four float parameters. The four parameters represent two Cartesian points, 2 x's and 2 y's. Return the distance between the two points. It involves a square root. Write a main function which will ask the user for 2 points (4 numbers), decide …

Member Avatar for mrnutty
0
292
Member Avatar for complexcodes

Hi all, I am playing around with list and I figure out how to merge two lists and all. But I have no idea how can I integrate one list onto another. For example A = {1,2,3,4,10,11} and B = { 5,6,7} Then my integrated list should be {1,5,2,6,3,7,4,10}. I …

Member Avatar for mrnutty
0
148
Member Avatar for tomtetlaw

How do I access the paramaters entered after param1? Like this: void foo(param1, ...); How do I access the ... part?

Member Avatar for Dave Sinkula
0
88
Member Avatar for number87

I am trying to convert a string "500.00" into float. When I use this it produces a string 50000, why does it produce such a result? [code] atof(bal.c_str()); [/code]

Member Avatar for mrnutty
0
177
Member Avatar for t_simpson

I'm a student but I'm not asking anyone to do my work for me, however I would like a little help if possible please. For part of my assignment I have to create a program that will issue a bepp of the value ( frequency and duration ) that the …

Member Avatar for t_simpson
0
75
Member Avatar for yugatpt

hai friends this is yugandhar, i want to learn c language so i want install c setup, wile iam installing the setup file is not installing proprally but right now iam using vista operating system can u help me any one, if u have any c language setup file send …

Member Avatar for Ancient Dragon
0
105
Member Avatar for preludeg5

Hello, I have a program written using Borland Builder C++. When ever I try to close the program, either by closing the form or having a button close the form, I get an access violation error. The error says: access violation at 0x41301e73: write address 0x1b50a18(this value changes) 89 02 …

Member Avatar for Ancient Dragon
0
92
Member Avatar for NinjaLink

Can someone help me determine if 2 stacks are the same? I am fairly new to stacks and need help. My header file is also below. Currently I am getting an error message using "==" and "!=" in my if statement. If someone can help, I will appreciate it! Thanks …

Member Avatar for VernonDozier
0
1K
Member Avatar for AdRock

I've bene banging my head against a brick wall trying to work out how to do this. I need to be able to read a text file line by line and to read each character of the line. When the character is a space, anything up to that is added …

Member Avatar for VernonDozier
0
269
Member Avatar for Dr EUU

for some reason when i run the program the print method for the array gets called instead of the one for the matrix..but it jus print out "array index out of bound".which is the exemption...the code is attached

Member Avatar for Dr EUU
0
85
Member Avatar for tomtetlaw

When I try to compile this: [code] #define NODES_MAX 100000 extern node_t _nodes[NODES_MAX]; [/code] It gives me this error: ------ Build started: Project: TheAlienEngine, Configuration: Debug Win32 ------ Compiling... main.cpp c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.h(12) : error C2148: total size of array must not exceed 0x7fffffff bytes Generating Code... …

Member Avatar for rdrast
0
750
Member Avatar for brijendra_kumar

how we can check a linkedlist of char have a palindrom or not but without distrubing pointers of linklist

Member Avatar for Tom Gunn
0
95
Member Avatar for slim2hott

I have made a window that has message boxes, menus and dialogs, but can someone tell me what is wrong with this .rc code? It looks ok for me it gives me this error: [Resource error] syntax error on the line 3, the one that starts with style. [CODE] #include …

Member Avatar for slim2hott
0
119
Member Avatar for Baseball400

Hey guys I made this program that works fine but the thing is I have to add a feature that will ask the user if they have more records to add to the file. Keep adding records until the response is No. Thanks. [CODE] #include <iostream> #include <fstream> using namespace …

Member Avatar for Ancient Dragon
0
79
Member Avatar for kv123
Member Avatar for YousefAB
0
128
Member Avatar for schnell

I have "Vertex" class pointers in a list. I want to delete these pointers and free up the memory. I deleted the pointers in the first for loop and set these pointers to 0. but just to check whether the pointers have really been deleted and set to NULL, I …

Member Avatar for schnell
1
113
Member Avatar for seo2005

I want to write a C program to test whether the character is uppercase, lowercase, digit or special symbol. [code=c] void main () { char ch; printf("\n Enter any character from the keyborad"); scanf("%c",&ch); if (ch>=65&&ch<=90) printf(" \n the character is uppercase); if(ch>=91&&ch>=122) printf(" \n the character is lowercase); if(ch>=48&&ch<=57) …

Member Avatar for Tom Gunn
0
291
Member Avatar for stoymigo
Member Avatar for stoymigo
0
112
Member Avatar for AirGear

guys, i have a project that needs using GUI in cpp. my lecturer suggests me to use Microsoft Visual Studio 6 and create a MFC based application. But i don't really understand how to use it. Can anyone please give me a link that can explain about that MFC stuff? …

Member Avatar for pspwxp fan
0
138
Member Avatar for FREEZX

I need to "decode" a string into numbers. it should convert 1=ij 2=abc 3=def 4=gh 5=kl 6=mn 7=prs 8=tuv 9=wxy 0=oqz so i made a code where i use a dynamic string array which should get filled up according to the above table, but when i try to print the …

Member Avatar for FREEZX
0
107
Member Avatar for gretty

hello How do I traverse & compare 2 linked lists that have different sizes without getting an error. For example: [QUOTE] List1 -> 1 -> 4 -> 6 List2 -> 8 -> 3 -> 2 -> [B]8[/B] [/QUOTE] [CODE] // I will get an error the 4th time this loop …

Member Avatar for Clinton Portis
0
90
Member Avatar for Dr EUU

hi ya all..im having trouble trying to code a matrix using a dynamicArray for my rows and columns..i get a problem calling the insert function from the dynamic array class because its not a base class for the matrix.just have a pointer of type dynamicArray...Can anyone help me call the …

Member Avatar for dkalita
0
52

The End.