49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
String swapping Output: Input name:Kitty yittk Thanks | |
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 … | |
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 … | |
Please let me know how can i use the container classes and STL in c++,shall i need any S/w or C++ IDE is enough? | |
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) ** **** ****** … | |
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). … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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, … | |
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 … | |
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?? | |
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 … | |
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 … | |
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; … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
I wanted to know an efficient algorithm to calculate the product of divisors.. My brute force method is giving me a Time limit exceeded. | |
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 … | |
[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 ) > … | |
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 … | |
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 … |
The End.