Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 27
c x 2
Member Avatar for Lokolo

[code] FILE *infile; infile = fopen("coords1.txt", "r"); int num = 0; for(int num1 = 0; num1 < 5; num1++) { for(int num2 = 0; num2 < 4; num2++) { for(int num3 = 0; num3 < 3; num3++) { fscanf(infile, "%f", &num ); targetCoords[num1][num2][num3] = num; } } } [/code] I'm …

Member Avatar for Lokolo
0
160
Member Avatar for Lokolo

[code] void writingTransactionToFile(string transaction) { string temp; int test; ifstream myfile("transactionlog.txt"); ofstream tempfile ("tempfile.txt", ios::app); if (tempfile.is_open()) { tempfile << transaction; if(myfile.is_open()) { while(!myfile.eof()) { getline(myfile,temp); cout << temp; tempfile << temp << endl; } } else { cout << "Unable to open file."; } tempfile.close(); myfile.close(); } else cout …

Member Avatar for brechtjah
0
168
Member Avatar for MJFiggs

I am a bit confused. I am trying to make a program that will take the choices you make and display them all simular to this: Item 1. Sword Item 2. Shield Item 3. Potion Item 4. Potion but when I try to run it it looks more like this …

Member Avatar for MJFiggs
0
134
Member Avatar for Lokolo

Main.cpp This is where the problem lies. [code] #include <iostream> #include <time.h> #include <math.h> #include <iomanip> #include "LinkedList.h" #include <fstream> #include <string> using namespace std; void main(void) { LinkedList Customers; Customer* newCustomer; Entry* test; int i = 0; newCustomer = new Customer(1001, "Olly", "07/10/1988", "17 Bob Lane", "Hobbs Road", "UB3 …

Member Avatar for Lokolo
0
113
Member Avatar for nedsnurb

Hi Have written this code for a program that requires the user to either enter 1 or 2 dependant on whether the program solves the problem of finding the divisors of any given to numbers by recursive or iteration methods. [code] #include<iostream> using namespace std; int recursiveGCD(int ,int ); int …

Member Avatar for nedsnurb
0
130
Member Avatar for Cwapface

Okay, I cannot figure this out. I still get the same error: [QUOTE]Error 1 error C2039: 'function' : is not a member of 'D'[/QUOTE] Here's what I have: Class A.h: [CODE] #pragma once #include <string> using namespace std; class D; class A { public: void function(string s); friend class D; …

Member Avatar for mrboolf
0
102
Member Avatar for elsa87

hi everyone the program below is a function that should give the number of items greater than a number entered by a user.(unsorted list ADT) ex: input 3 unsorted list contains: 2 6 8 1 5 9 8 output should be 5 here is my try by there are alot …

Member Avatar for WaltP
0
205
Member Avatar for Lokolo

[code] transactionInfo = date + " - " + _strtime( time ) + "New Customer - 1001 - Olly"; [/code] Ok so I've been trying to find it everywhere in C++ reference guides but it seems I can't do the above ^^ (says I cannot add 2 pointers). date is …

Member Avatar for Alex Edwards
0
185
Member Avatar for Lokolo

[code] int numOfMonths = numOfYears * 12; float monthlyRepayments; float actualRate = (rate/100)/12; //monthlyRepayments = (borrowAmount*(pow((1+actualRate),numOfMonths))*actualRate)/((pow((1+actualRate),numOfMonths))-1); monthlyRepayments = (100000 * (pow((1+actualRate),180) * actualRate))/((pow((1+actualRate),180))-1); [/code] Ok this is the actual equation: (100000*(1+A1)^180*A1)/((1+A1)^180-1) btw A1 =0.06/12 So the commented line is original one I tried, didn't work. So I tried just putting …

Member Avatar for Lokolo
0
147
Member Avatar for Lokolo

Btw below is the key parts of my code - not all as there are loads of lines: [CODE] //main.cpp #include <iostream> #include "Customer.h" using namespace std; void displayMainMenu(); int enterMainChoice(); void displayAccountMenu(); int enterAccountChoice(); int enterCustomerID(); Customer createCustomer(); void main(void) { unsigned short numberOfCustomers = 0; Customer *Customers[10]; *Customers[numberOfCustomers] …

Member Avatar for minas1
0
166