49,761 Topics
| |
this code is for bring an output of "Hello, [name]!" with frame on its outside. [CODE]//ask for a person's name, and generated a frame greeting. #include <iostream> #include <string> // say what standard-library names we use using std::cin; using std::endl; using std::cout; using std::string; int main() { // ask for … | |
First let me start by saying that I hope I wrapped my code properly. Next, my instructor sent us some code using a class and instructed us to add to it and make it so that we can display a checking account balance from a simple three line text file, … | |
Write a function which accepts a sentence as input parameter. Each word in that sentence is to b reversed (remember: not the whole sentence to b reversed, each word should b reversed). Space should b there between each word. Return the sentence with reversed words to main function and produce … | |
Hey guys, I need to print out character symbols for this program. I need to print 2 different shapes of symbols. For the first shape, I have to print out a triangle, represented by the "*" in the nested for loop. I need to print out a square shape using … | |
Hello I have hit a wall with this issue, been at it for a few hours now and it is bewildering to me to say the least With that being said, the below code is giving me some erroneous answer during the execution. The user enters a number from the … | |
How do i constantly keep checking for specific characters in a text file till there are no more specific characters left. this way i can keep displaying text file logos on my application until there are none left in the text file being searched by c++ :) i did have … | |
Hello, as you can tell from my username I'm completely new at C++ and have no idea how to write a function that won't chuck up any errors! What I'm trying to do is to compare an inputted student's ID number to ones already stored in my current array and … | |
Write a program that will ask the user for the name of an item, the part number of the item, the cost of the item and the quantity of the item. The program will then calculate the total cost of the item. The program will also keep track of the … | |
| |
Alright to star off let me say sorry for my english typos. This question is not for a homework and in no way related to school. Im in 3d conception. But looking to get a program for personal use. I have a project i want to work on and need … | |
I have this project that takes a team name, how many members are on a team and the individual times. I need to output the teamname and times (in seconds) and then the total time of each team. I'm having trouble adding the total team times. [CODE]while(infile.peek() !=EOF) { getline … | |
I'm working on a school C++ program, and its my first that uses classes and objects. Its great fun, and I'm almost done. I have a problem with the search function, which involves several pieces of code- the .h files, the .cpp implementation file, and the main code file. If … | |
Hello all, working on an assignment for a class and I'm encountering something strange. After I'm getting a bad memory allocation exception upon exiting my program. After debugging the problem it appears to be a result of trying to make vector with negative length. The program runs fine until it … | |
I have a program which consists of two windows (hWnd, and picturewind). I would like to write code which takes an action every time a person clicks inside of the second window (picturewind) but not when the person clicks in the first window (hWnd). Can anyone tell me how I … | |
Hi all, 2nd week programming and face first into the wall again haha. As always I appreciate any advice or critique. I have a small c++ program that reads through log files from a program and scans for errors. For the most part it works really well but I'm trying … | |
Please repair my loop. [CODE]#include <iostream> using namespace std; int main(){ int size; cout << "How large a triangle do you want? "; cin >> size; for (int r = 0; r < size; r++) { for (int c = 1; c <= size; c++) { if (c <= r) … | |
Hi, I have drawn a human face using simple shapes such as big circle for the face, little circles for the eyes, lines for eyebrows and triangle for the nose. I have been asked to create a template for various expressions of the face (fear, happiness, disgust, etc). Once I'm … | |
Hi there! I would like a little help regarding the following code. The following code will wait for a non-blocking socket connection, and then wait to receive a certain packet. When the packet arrives, it will do something and then close connection and reinitialize it in order to be able … | |
Hello guys, I need some help with a program that finds all the prime numbers from 2 to 10000,here is what I have so far [CODE] #include <iostream> using namespace std; bool prime(int n ); void main () { int n,b; b=0; for (n=2;n<=10000;n++) prime (n); if () { cout<<n<<endl; … | |
CSV is more than just comma delimited fields. There are quoting and white space rules too. This is a short function as an example of a complete way to read CSV records line by line. | |
I am trying to use Minipar parser.hence i downloaded it from the following link [url]http://webdocs.cs.ualberta.ca/~lindek/minipar.htm[/url] then I created an environment variable MINIPATH as was directed in the "Readme" file.But when i tried to run it through devc++ numerous errors occurred.the log file is as follows F:\pdemo\pdemo.cpp:20:19: ptree.h: No such file … | |
Hi i could not specific Record from my binary file. This is the method to list out all records. [code] int student :: showall(fstream &fp) { student rec; fp.seekg(0,ios::beg); int i=0; cout<<"Position\tRoll No\t\tName\tBalance"<<endl; while(fp.read((char*)&rec,sizeof rec)) { cout<<i*sizeof rec<<"\t"; rec.show(); i++; } } [/code] While running this i got the below … | |
Hey everyone, I'm need help with a problem I'm working on. I am trying to write a code that will tell how many coins are in the amount of change from 0 to 99. My algorithm is: Get total value of change Set value of quarters to q=.25 Set value … | |
Hello all, I recently installed MinGW on my XP Pro box (SP 3). When I click on the shell icon, the resulting behavior of the MinGW shell console window is incorrect. Initially, the console opens up as it should, complete with frame and scroll bars, but after about 5 seconds, … | |
Is it possible to create a dynamic-sized array of structures within a structure? To provide some info, I want to read some student info off an input file, which includes some miscellaneous information, subject codes and corresponding marks. The number of subjects taken is also provided as a number in … | |
I am writing a recursive function to return an integer after converting a string. I am very close. This was already quite the brain teaser, and recursion is not my cup of tea. Perhaps somebody can help with this small little problem I am having. The last thing I need … | |
Hi all, I am doing the assignment as below. It is nothing wrong but just I think I complied c code and c++ code in the program. Now I would like to change it to work under c complier, but just dont know which part is wrong. Can anyone of … | |
Hi guys, I've developed an application using C++ and this app uses a C# dll which is registered as a COM object. Now it works on the computer I developed it on. But it doesnt seem to work on another computer even though I registered the C# dll it needs. … | |
please install this C++ software and according to image i am getting few errors will some one help me solve this problem ? software link : http://www.ziddu.com/download/17082595/turboc.zip.html image link : http://www.ziddu.com/download/17082611/untitled.JPG.html thank you .................... | |
I'm writing an alphabet cipher that ciphers at random. It looks like it should work when I'm debugging it but when I look at the cipher key it comes out with duplicate letters like some of them weren't switched during the for loop. Any help is much appreciated. WasSwapped is … |
The End.