49,761 Topics

Member Avatar for
Member Avatar for kasumi01

im working on a program who the user enters data of a Movie: name, Director, and playtime im on my last error but i cant see the where the problem is ore what to do i trayed to change some parts in the code to see the problem with no …

Member Avatar for kasumi01
1
222
Member Avatar for yun

write a program that read in an array of integers-- ideally from a text file. and then displays a histogram of those numbers, divided into the ranges 0-9, 10-19 ,20-29, and so forth, up to the range of containing only the valye 100. Please help me to write a efficient …

Member Avatar for vmanes
0
2K
Member Avatar for Usura

hey Ive been given a task which im suppose to create a chained container which recieves only 1 string, and continues chaining untill there is a repeat in the input, I was thinking that maps would be more appropriate but im not sure if I would be able to chain …

Member Avatar for StuXYZ
0
108
Member Avatar for Mudi

Hi, can any one tell me that how can i add two different statment constant and show it one answer for example , cout<<"cost of letter ,0.40"; cout<<"GST:0.05"; i want to add values between these two statment o.40+0.05=0.45 i want to perform this function in programme so can anyone please …

Member Avatar for siddhant3s
0
113
Member Avatar for happypig112
Member Avatar for yun

i need little help of urs in the above code, RightFrom Function is perfectly working but there is a logic bug in LeftFrom Function. when i m sending North as argument the result from LeftFrom is -1 but i need 0. help me to solve this issue. [code]#include <iostream> using …

Member Avatar for Ancient Dragon
0
98
Member Avatar for mimio134

Hey guys appreciate u can help to do this: Write a program to implement linked lists to handle large integers. Since we cannot store big integers in any of the primitive types, the only way is to manage each digit as a node in the linked list. Take care that …

Member Avatar for Sky Diploma
0
2K
Member Avatar for Prasannanjaneyu
Member Avatar for Sky Diploma
0
178
Member Avatar for pspwxp fan

Hello, i'm learning to work with loops and it was fine untill it came to nesting loops. In an exersize, i was told to use nested loops to display a pattern of asterisks like this: (2 asterisks, 4 asterisks, 6 asterisks, 8 asterisks, 10 asterisks, 12 asterisks) ** **** ****** …

Member Avatar for pspwxp fan
0
560
Member Avatar for don0369

Hello everyone this is my first post. My problem is reading from a text file. The file is in the format: name\tdouble\tdouble\tdouble int Since I have no control over the format of the file and do not know the size, I first begin by counting the lines of the file(nLineCount2). …

Member Avatar for don0369
0
117
Member Avatar for connormcleod

hello, I am working on a little database program in C++ that writes to a text file, saves, and then reads the text file into array's, but i'm not real sure how to go about converting the information in the text file back into arrays. the text file looks like …

Member Avatar for kvprajapati
0
9K
Member Avatar for gretty

Hi I am testing myself by making a simple program that reverses the contents of an array. It works for some values but the last value of the array is not correct. Can you take a look over my code to point out where its going wrong? the original array …

Member Avatar for s_sridhar
0
115
Member Avatar for gretty

Hi I am making a program that reads a string, when it finds a '.' character it changes the next character after the '.' to uppercase. My problem is, I am trying to take a string with 5 arrays (string line[5]), & extract the 1st character of line[0], then the …

Member Avatar for siddhant3s
0
262
Member Avatar for adarshcu

[code=Cplusplus] file.open("1.txt"); file.seekp(pos,ios::beg); getline(file,temp); file.close(); [/code] i ve this small code where temp is string data type. suppose the value of pos points to a location yet to be filled with data, what would be the value stored in temp? is it NULL? temp is not been initialised by any …

Member Avatar for vmanes
0
100
Member Avatar for osmano807

Hello, I am developing a program that will read files with many lines of text (perhaps 20 thousand), and to look for a text on each line, hit the text, perform a function. I have a problem because the files have as many lines, the program will be very slow, …

Member Avatar for ArkM
0
119
Member Avatar for gretty

Hi I am making a program that reads a text file & displays them into an array. My problem is; I read the text file to determine how big the array needs to be, then I clear the input from the text file, then I read the text file again …

Member Avatar for Ancient Dragon
0
91
Member Avatar for catchmrbharath

I was coding for a particular problem whose time limit was 2 seconds.. The no. of input was max 300000. Simply taking in the number using cin and outputting the same number with cout will take more than 2 seconds. Any ideas on how to increase efficiency??

Member Avatar for s_sridhar
0
151
Member Avatar for Intrade

Without using some new language like Perl, how would one be able to access a web-page, given specific session information? And also, which C/C++ libraries are good for doing this kind of job? If this is at all a weird question, I'll explain. I'd like to be able to write …

Member Avatar for kvprajapati
0
141
Member Avatar for lexusdominus

Im developing software that will handle alot of files & i was wondering what the best way of doing this is. There's a couple of things that are important. 1) i want to be able to access the files easily and have them grouped. 2) i want the files to …

Member Avatar for csurfer
0
249
Member Avatar for JackDurden

So in a binary tree the insertion looks something like this: [CODE] void btree::insert(int num) { if(root!=NULL) { insert(num, root); } else { root=new Node; root->data=num; root->left=NULL; root->right=NULL; } } void btree::insert(int num, Node *leaf) { if(num< leaf->data) { if(leaf->left!=NULL) { insert(num, leaf->left); } else { leaf->left=new Node; leaf->left->data=num; leaf->left->left=NULL; …

Member Avatar for csurfer
0
121
Member Avatar for boiishuvo

[COLOR="Red"]Check out the red highlighter below, how can you sum the studentMark[MaxSize] for an average. For example (78.5 + 66 + 73 + 56.5 + 88.3 + 64.5 + 45 + 57) divides actualNum = average. I've been figuring that one for hours! [/COLOR] [code] #include <iostream> #include <string> using …

Member Avatar for VernonDozier
0
515
Member Avatar for fadia

heey guys.. i have this h.w.. i solved the first part which is based on the second part.. but not sure whether i did it right or not.. can someone check plz.. this is the Q.. i only did the first part! First create a one dimensional array called numbers …

Member Avatar for ArkM
0
116
Member Avatar for Steve00000

i read a thread in this forum about hardware programming with c++. thats something i'd like to do. i wanted to start on the parallel port and so i looked up some parallel port tutorials. later on i thought to myself... wait.. i dont have a parallel port comming out …

Member Avatar for Dave Sinkula
0
140
Member Avatar for nagu89

This is a program to find the least common multiple of numbers 1 to 20. I dont know why it doesnt work. Somebody please help me out [code=c] #include<iostream> #include<conio.h> #define A 100 using namespace std; int i; bool IsItDiv(int); int main() { int num=21;bool tf; tf=IsItDiv(num);cout<<"The number thats divisible …

Member Avatar for ArkM
0
120
Member Avatar for cruisx

Hi guys need a bit of help, i am making a prgram but i am stuck. I am displaying 9 8 7 6 5 4 3 2 1 and i ask the user to put in order,. So like 1 2 3 4 5 ...etc. Now i need it so …

Member Avatar for VernonDozier
0
338
Member Avatar for catchmrbharath

I wanted to know an efficient algorithm to calculate the product of divisors.. My brute force method is giving me a Time limit exceeded.

Member Avatar for ArkM
0
136
Member Avatar for Thediabloman

Hi! This is my first post, so be gentle.. :D I am learning CPP with a book called "Beginning C++ Game Programming", and I have run into a problem. The book asks me to make a program were the user can enter his/hers favorite games, delete a game, and print …

Member Avatar for Narue
0
83
Member Avatar for san gabriel

[code=cpp]#include "stdafx.h" #include <iostream> #include <iomanip> #include <cstring> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { char s1 = ""; char s2 = ""; cout << "Input String1: " ; cin >> *s1; cout << "Input String2: " ; cin >> *s2; if ( strcmp( s1, s2 ) > …

Member Avatar for mirfan00
0
435
Member Avatar for swisschris104

Umm... Im New To c++, But Not New To Programming Lemme Tell you All About Me Before Yu All Pile On Me! Im Only 14! I Can Program basic Online Codez :CSS and HTML. I Can Also Program Visual Basic ( 3/4 of it) My Question About C++ is Can …

Member Avatar for Narue
0
131
Member Avatar for lss123

I just wanted to post the code I wrote for an OO C++ solution to solving sudoku puzzles. I'd like to invite anyone to ask questions, give comments, or make critiques on the methods or algorithms in the code. For a recent job interview, I was tasked with writing a …

Member Avatar for lss123
0
471

The End.