2,025 Topics
![]() | |
[I]Negotiating a consumer loan is not always straightforward. One form of loan is the discount installment loan, which works as follows. Suppose a loan has a face value of $1,000, the interest rate is 15%, and the duration is 18 months. The interest is computed by multiplying the face value … | |
I have a 2nd generation iPod touch 16GB with some scuffing on back, the screen is flawless, it has had a screen protector on it from the start. I really need to still have a music player, and with iOS 5 coming out this fall, i can't really use it … | |
I am trying to create my login system but I have got a problem with reconizing the value from a file. getline(fstream) recognizes it and puts it in a char(reg_confirm), but I can't set a different function for a different value. it should go like this: if (value == "0") … | |
I require a survey c++ program. The requirements are that it must do the following: It must first the user what they would like to do: 1.Complete the survey and writing it to a file, averaging some results and then quiting 2.Read the survey results from the files (password protected) … | |
Ok, I've asked something similar before, but I still have not been able to understand this... so I just want to have a txt file with math operations in it. Basically, it's just integers multiplies and added. Nothing else. 1*5+10 10+12 Each line can contain any multiplication or addition. The … | |
Can someone please explain to me how the pointers were used in the line w/ the red font. I do not understand where the pointer pertains to and why there is still a need for that. Also why is it that a "+" sign was used to combine two array … | |
i have a program that reads in a file with shapes and numbers and tokenizes each line. after it tokenizes, it then calculates the shapes dimensions. what i need to do is make it so that this program reads in the file and stores every shape and its values into … | |
This is our new and revised program... for the registration: I thank all of those people who helped me. for the search function: so I've manage to, actually my teammate managed to get a search function working for edit function: we havent figured it out on what methods are gonna … | |
Hi, I am trying to read an input text file. And read the last letter only and check if it is an '+' or '*'. Here is the code I have written so far, if anyone can help me, I would be very greatful. [CODE] while(input>>lastChar) //put file contents into … | |
This is the program that I have written, my problem is that the contents in the for loop does not execute. When I compile I get enter number of students to be registered And total cost of discount is R 0 QUESTION 2 PROGRAM #include <iostream>using namespace std; int main() … | |
The code runs but the problem is that the the discount value is not calculated wrong. Which part did I miss here. Here is the question: You now have to add a function discFee that has three value parameters - two of type int representing the number of sport and … | |
I decided to give this a go again today. The pupils of the Annandale High School have to pay a fee for each extramural activity that they want to partake in. These activities include sport, and other activities such as chess, ballet, etc. The fee for sport activities is R120 … | |
HP announced this morning a new printer that’s the first of its kind: the TopShot LaserJet Pro M275. What makes this printer different? Of course it has the usual scanning feature that the HP LaserJet’s have featured for years, but with a new spin, 3D scanning. The TopShot doesn’t have … | |
This is a simple one, but don't know why it won't work. Question VALUE RETURNING FUNCTIONS WITH ONE OR MORE VALUE PARAMETERS The pupils of the Annandale High School have to pay a fee for each extramural activity that they want to partake in. These activities include sport, and other … ![]() | |
I have been trying to write this code that calls a text file in the command line, it then reads the file and if the file has integers that look like this (1+2+3+5)it takes there sum and outputs it into a different text file, if it looks like this (1+2 … | |
well, i have been working on two projects.... in of the projects i am getting two errors which i am unable to rectify ....please please could you possible identify the two errors for me...?? i shall be really really grateful.. you can try running the below program in Microsoft visual … | |
We have a problem similar to [URL="http://forums.techguy.org/all-other-software/947576-solved-java-applets-only-working.html"]this[/URL] Clean boot doesn't help and the unchecking of services doesn't help ether. We have a Java applet that's working correctly on xp but isn't working correctly on win 7. The applet runs and the browser asks you to accept the certifiket but the … | |
[CODE] IpPairVec matches; blah blah other definitions for (unsigned int i = 0; i < matches.size(); ++i) { drawPoint(img1,matches[i].first); drawPoint(img2,matches[i].second); const int & w = img1->width; //.........etc etc etc } std::cout<< "Matches: " << matches.size(); //This returns a number after every iteration which is continuous. //I am able to redirect … | |
[CODE] #include<iostream> #include<windows.h> #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<fstream> #include<string.h> #include<windows.h> #include<fstream.h> #include<ctime> void checking(); void display(double); enum check{correct,incorrect}; class words { public: char word[20]; check cword; check cchar[20]; }; void main() { ifstream fin("Book.txt"); char ch; char wrd[20]; time_t start,end; double dif; cout<<"\n Enter the text below. Press 0 to finish … | |
hello guys, The file is not getting deleted in the function modify for some reason.....pls help!!!!!! pls do look at this code [CODE] #include <iostream.h> #include <conio.h> #include <fstream.h> #include <stdio.h> #include <iomanip.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <process.h> #include <math.h> #include <windows.h> class car { int no; … | |
![]() | [CODE]// bakers.cpp : Defines the entry point for the console application. // /* HEADER USED IN THIS PROJECT*/ #include "stdafx.h" #include<iostream> #include<conio.h> #include<stdlib.h> #include<string.h> #include<string> #include<stdio.h> #include<process.h> #include<fstream> #include<ctype.h> using namespace std; //Classes in this program class Bank { private : long Ac_no; string f_name , l_name ,City; char Ac_type; … |
[ATTACH=RIGHT]21839[/ATTACH]Appcelerator and International Data Corporation released the results of their joint [URL="http://appcel.us/q3_2011_report"]survey[/URL] today, August 3, 2011. This survey of 2, 012 Appcelerator developers shows that Apple and Google are accelerating their market share in mobile with the new Google+ and iCloud. Developers surveyed believed Apple and Google will offer fierce … | |
It will not add Inventory to the program. It prints out zeroes for the list. Please someone help me make this work [CODE]#include<iostream> #include<string> #include<iomanip> #include<fstream> using namespace std; struct Inventory { long Inventory_N; float Price; char Inventory_Name[50]; }; void menu (ifstream&, ofstream& , Inventory L[], int); void loadInventory(ifstream&, Inventory … | |
Ok basically I'm just looking for ideas for work arounds. Here's my issue. The only way I can watch megavideo videos on my phone (being that the iPhone doesn't support flash and the "frash" work around is garbage) is to use an app called iMegaVideo. You find the link to … | |
hi, i am trying to make a weight watchers program and heres my code: [CODE]#include<iostream> #include<fstream> #include<conio.h> #include<cstdio> #include<windows.h> using namespace std; int main (char argc) { for(;;) { system("cls"); ifstream r; r.open("cdaily.txt"); double r1; r >> r1; r.close(); ifstream r2; r2.open("cweekly.txt"); double r3; r2 >> r3; r2.close(); cout << … | |
Hi i have a task to stores marks for students, a struct is used to store this. the thing giving me trouble at the moment is how to read and store a floating point number within a struct, the data specifically for the mark is on 1 line of a … | |
I have created a program allows you to input the amount of items purchased, and then input the price of each item and the sales tax. It then creates a receipt which totals all the prices and sales tax. Now I want to be able to list the items and … | |
Write a global function called format, which formats numbers with a given number of decimal places. The function accepts a compulsory first argument of type double (the number to be formatted) and a second optional argument of type integer (the number of decimal places) and returns a string object containing … | |
With the release of iOS 5 to developers, Apple has signalled the arrival of the much awaited iPhone 5. But when can we expect to see it, and how will it be different to the iPhone? As usual, the Apple rumor mill has been churning out specs for many months … | |
[ATTACH=RIGHT]21548[/ATTACH]Earlier this week a hacker group called Dev-Team launched a revamped website service that enables owners of the iPhone 4 and iPad 2 (amongst a myriad other iOS-powered devices) to jailbreak them in next to no time, for free, online. The [URL="http://blog.iphone-dev.org/post/890709355/the-return-of-jailbreakme-com"]JailBreakMe site exploits a vulnerability[/URL] with the way that … | |
I want to have the ability to rerun the following from the very beginning, however, I have only been able to get it to rerun from the middle of the program where it asks for sales tax. I've tried moving my do/while tags around to everywhere but nothing seems to … | |
How do I authenticate a .aspx page in objective-c? I've googled and viewed countless results to no avail. I found something about NSURLCredentials but nothing helpful. Any pointers would be very much appreciated. | |
Hi I wasn't sure if this was the right section or not How is a GUI implemented in modern operating system. Currently I use win32 code to generate a window and then use openGl with C++ to generate the application. How is explorer.exe (the windows interface) designed and built. Does … | |
I've been attempting to do a basic XOR encoder but I got this problem: Everytime the result of the XOR operation is 10, the app writes 0xA 0xD, and I can't avoid this. Code: [CODE] #include <iostream> #include <fstream> #include <stdio.h> using namespace std; char* readfile(char * filename,int* size){ int … | |
[CODE]int realX = winSize.width + (projectile.contentSize.width/2); float ratio = (float) offY / (float) offX; int realY = (realX * ratio) + projectile.position.y; CGPoint realDest = ccp(realX, realY); [_projectiles addObject:projectile]; projectile.tag = 2; [projectile runAction:[CCSequence actions: [CCMoveTo actionWithDuration:realMoveDuration position:realDest], [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)], nil]];[/CODE] In this simple app, I am trying to … | |
Hi I am making a banking system in c++ but getting a problem I am not sharp in programmin if you can help then thanks [CODE]//*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include<iostream> #include<conio.h> #include<stdio.h> #include<process.h> #include<fstream> #include<ctype.h> //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** using namespace std; class … | |
I have run into a unsolvable runtime error, I always get the message invalid floating point error, with the following C++ program. This program reads floats from a file(float.txt) 1.56 .98 5.78 Then sorts to put the largest float on top. But when I try to read this I get … | |
[CODE]int realX = winSize.width + (projectile.contentSize.width/2); float ratio = (float) offY / (float) offX; int realY = (realX * ratio) + projectile.position.y; CGPoint realDest = ccp(realX, realY); [_projectiles addObject:projectile]; projectile.tag = 2; [projectile runAction:[CCSequence actions: [CCMoveTo actionWithDuration:realMoveDuration position:realDest], [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)], nil]];[/CODE] In this simple app, I am trying to … | |
I wrote the following code to create a wav file which generates varying frequencies based on the Hebrew Gematria pattern. It compiles great but does not write the wav file. What am I not understanding about this code? [CODE] #include <iostream> #include <math.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include … | |
I have started dabbling in Objective-C for iOS developing. Is using the C forum of this website appropriate for questions regarding Objective-C? If not, what would the correct forum be? Thanks! | |
Hi all! I have a little problem here, I would like the width function in cout applied to all the sucesive outputs. However, it is only applied to the next output only, I mean, with this code I get 0:00:10:20:30:4 1:01:11:21:31:4 2:02:12:22:32:4 3:03:13:23:33:4 4:04:14:24:34:4 5:05:15:25:35:4 6:06:16:26:36:4 7:07:17:27:37:4 8:08:18:28:38:4 9:09:19:29:39:4 and … | |
Hi, i have written this block of code which deletes a record from a file, it works to some extent. i can delete existing records but at the second deletion and i display the file contents, i get some gibberish. also i cannot delete records which i have added to … | |
Hi i'm attempting here to let a user select the id of a record he/she wishes to modify, find that record and allow the user to modify the record. this is as far as i got, after i locate the record and try to display it i get gibbrish as … | |
Hi guys.Does anyone who studied the implementation of stringstreams know if : [code] char c; std::stringstream ss; ss << std::fstream ("file.xml",std::ios::in).rdbuf();//this is eqaul in terms of speed while (ss.get(c)) {} //with this? std::ifstream f("file.xml"); while (f.get(c)) {} //or this? [/code] Thanks a lot. | |
First let me tell you what my program is doing. its basically a shopping list program. Whereby the user will input the values and it is then inserted into a text file. There will be 3 inputs (Item Description,Unit Price,Quantity Purchased) and is stored into the text file as (Shoes:$200:2) … | |
Hi, i am trying to read from a random access file and display its contents to screen, however when i run the code nothing is displayed. I'm using a struct call "Menu" to store each record in the file and display it as the program moves through the file. Can … | |
I have problem completing a program and I would be really really thankful if someone could help me with this . This is my code so far: [CODE]#include <fstream> #include <iostream> #include <conio.h> using namespace std; void registret(void); void lista1(void); void lista2(void); void search(void); void sortering(void); void addcar(void); void sell(void); … | |
Hey, May someone please explain to me why the rename function isn't working? result should display a 0 if the files were sucessfully renamed. it keeps returning a -1. [CODE] #include <iostream> #include <fstream> #include <iomanip> #include <cstdio> using namespace std; int main(int argc, char *argv[]) { bool Stats; char … | |
Hey, I have a file that I am working with that I have pass into my program through command line arguments. I don't want to touch the file, just want to store a temp of the file then after fixing the temp place it back in the original. After running … |
The End.