2,025 Topics

Member Avatar for
Member Avatar for jpico

Hi, I've been trying to write a converter that converts several units. I want it to be able to prompt the user to retype an input if they type an invalid input... I'm struggling with this part. This is what I have so far. [ICODE] #include <iostream> #include <iomanip> #include …

Member Avatar for Red Goose
0
156
Member Avatar for dmr1775

Hey all I have a program that I have been working on and am having some trouble with keeping count of all the users grades. I know that now I am only counting the last grade earned for each category but I want to know how to keep count of …

Member Avatar for WaltP
0
210
Member Avatar for ntrncx

i try to understand how it works. its supposed to work but isnt. the following code shouldnt be working?what i do wrong? i receive the constructor values. [CODE]#include "Person.h" #include <iostream> #include "fstream" #include "cstdlib" using namespace std; int main() { fstream file("malakia.dat", ios::out | ios::in | ios::binary); Person data; …

0
114
Member Avatar for MichaelDrew

[ATTACH=left]22858[/ATTACH]The HP LaserJet Pro 100 is a very sleek looking printer. The compact design will fit into what ever corner you can find for it, and due to its easy to setup networking options you may never physically connect it to a computer. On the front left side of the …

0
552
Member Avatar for dragon_chick

Ok, so for this assignment, we were given a program and a class. We have to find where the program code needs modified and make the changes necessary to use the class. [CODE]/****************************************************************************** Programmer: Date: November 6, 2011 Compiler: Cisual C++.NET Source File: hw7.cpp Action: Reads words from stdin and …

Member Avatar for Moschops
0
304
Member Avatar for ntrncx

hey all i am studying from a book,and i have to do an exercise. i dont want code or anything i want tip or someone explain me how to do it. i have a oldmast.dat file with some records a trans.dat file with records and i have to update the …

Member Avatar for ratatat
0
743
Member Avatar for C++newbie chick

Hi guys, what I'm trying to do is allow the user to add a new student record to the system. If the user inputs a student ID already existing in the system, it doesn't accept the ID, but if it's a new student ID, it asks the user if they …

Member Avatar for raptr_dflo
0
250
Member Avatar for C++newbie chick

Hello guys, I've tried searching the internet on how to cout a struct in an array via a binary search, but with no success. I've only learned how to do a linear search and I sort of understand how to do a binary search but: how do I cout the …

Member Avatar for C++newbie chick
0
2K
Member Avatar for smmcfarl

My program is compiling fine but my issue is with the output. The grades are not correct and the counters are not working either. If anyone can help that would be great. [CODE]//stud.cxx #include "stud.h" studType::studType(int idVal, float exam1Val, float exam2Val, float exam3Val) //********************************************* { id = idVal; exam1 = …

Member Avatar for gusano79
0
155
Member Avatar for VengefulToast

Sorry for the newbie question, but I was just wondering if it is possible to program in C++ or some language other than Objective-C on iOS devices? If so, what tools could I use? Visual Studio? Thanks!! :)

Member Avatar for VengefulToast
0
114
Member Avatar for C++newbie chick

Hello guys, just wondering why my program crashes when I try to delete a struct from my array. I'm trying to code so that the user searches for a student via a student ID, then opt to delete the searched student's record. I thought I got it right and the …

Member Avatar for chandara
0
859
Member Avatar for karmstrong

I am having a couple of problems. I think I got the formatting down for the most part. I am having issues in a few calculations and how to iterate through them. Basically I need to take the radius and calculate the circumference and the volume. Once I have the …

Member Avatar for raptr_dflo
0
328
Member Avatar for slygoth

I am trying to open a text file in C++. I dont want the file to be open in the console i want to open the file using one of the text editors like gedit. Can someone show me how to open it using gedit and not in the console. …

Member Avatar for Stefano Mtangoo
0
275
Member Avatar for maynardjk13

Greetings! I've been working on this program for the past couple of hours now, and I cant seem to get it right. I'm supposed to write a program that reads in integers from a text file, and then find the sum of the integers. The problem I'm having is with …

Member Avatar for maynardjk13
0
234
Member Avatar for infantheartlyje

Hi folks, I had created a class for student. This is the class. [code] class student { int rollno,marks; char name[20]; public: void show(); void get(); int filecreate(const string &,fstream &); int fileopen(const string &,fstream &); static int add(const student &,fstream &); static int read(const student &,fstream &,int); static int …

Member Avatar for WaltP
0
224
Member Avatar for Navlag

I am getting the following error: PII.cpp:266: error: 'struct std::string' has no member named 'getfirstblock' And I'm not sure how to fix it, since "int block" has to be equal to the firstblock of the file, how can I fix that error? Also, my "getfirstblock" function should return the block …

Member Avatar for baldwindc
0
891
Member Avatar for sasho648

My question is why fstream can't read 0x1a. For example make a test file and inside it write in HEX editor 30 1A. [CODE]#include <iostream> #include <fstream> typedef unsigned long DWORD; using namespace std; fstream myfile; template <class T> T grad(T value, int step) { T val(value); if(!step) return 0; …

Member Avatar for sasho648
0
366
Member Avatar for v3ga

Hi everyone just started Daniweb! I have been using devcpp for some time.I am trying to make a switch from DevCpp to Visual Studio but find the latter confusing having so many options. Recently, I did a console application that will accept a word from user and prints its anagrams. …

Member Avatar for v3ga
0
276
Member Avatar for C++newbie chick

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 …

Member Avatar for C++newbie chick
0
325
Member Avatar for infantheartlyje

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 …

0
104
Member Avatar for C++newbie chick

Hello guys, I'm trying to make it so that the user can opt to change student's course code or credit points (they can choose to change neither, either or both) in case 5 of my main switch statement. The problem is, the loop doesn't end after you choose to do …

Member Avatar for Ancient Dragon
0
317
Member Avatar for ishaan3731

i am doing a project on student information system using file handling...i made my own project but it didnt work....i read many books but actually the main problem is that i lack logic.....i have found from the net this project but the output on the notepad file is giving unusual …

Member Avatar for ishaan3731
0
361
Member Avatar for MadSkyrim

I have the following html file [CODE]<!DOCTYPE hmtl> <html> <head> <title> Minimum Spec Test </title> <script src="Compatability.js"></script> <script type="text/javascript"> var can, ctx; var img = new Image(); function Init() { can = document.getElementById('canvas'); can.width = 100; can.height = 400; ctx = can.getContext('2d'); img.src = 'Images/_test.bmp'; ctx.drawImage(img, 0, 0); } </script> …

Member Avatar for phoenix_2000
0
275
Member Avatar for infantheartlyje

Hi folks, I have written code to random access files in c++ . I got result without creating a method for write a record to the file. I have given the code snippet below. [code] #include<iostream> #include<fstream> #include<iomanip> using namespace std; class student { int rollno,marks; char name[20]; fstream fpointer; …

Member Avatar for infantheartlyje
0
316
Member Avatar for jpd5066

Here is my code for the same exact program. I have everything working except for displaying the calculated monthly interest. I could use some help. #include <iostream> #include <iomanip> using namespace std; int main() { double mortgage, interest, payment, years, monthlyInterest, monthlyBalance, numPayments; int counter; cout << "Please enter a …

Member Avatar for jpd5066
0
102
Member Avatar for infantheartlyje

Hi..this is my coding. Its compiled successfully. But i could not get my result. I don't know whether the data stored in the file successfully or not. Please Help me. [CODE] #include <iostream> #include <fstream> #include <cstring> using namespace std; struct status { char name[80]; double balance; unsigned long account_num; …

0
99
Member Avatar for jigglymig

I am having trouble with the program not pushing the strings and only part of the characters from the file. I really hope one of you can help me because this is due in the morning here is the actual assignment Learning Objectives: The purpose of this lab is to …

0
65
Member Avatar for PSP1202

Hey all I'm having trouble with loops again and this time it is for loops. I need to calculate monthly balance and interest paid on a balloon mortgage and am having trouble with the calculations. An example of what the program should look like: Enter Mortgage: 100000 Enter Interest Rate: …

Member Avatar for WaltP
0
113
Member Avatar for infantheartlyje

HI folks, This is my code. How can i pass a outside structure parameter to a class method? [CODE]using namespace std; struct status { char name[80]; double balance; unsigned long account_num; }; class FileHandler { public: FileHandler(string); ~FileHandler(); int getRecords(struct status *); int putRecords(struct status *); private: string fileName; fstream …

Member Avatar for raptr_dflo
0
175
Member Avatar for smmcfarl

I am trying to make a program to add, delete, and print a sorted linked list. I have tried many different things and now I am getting a Segmentation Fault so I was wondering what I am doing wrong? Here is my code so far: [CODE]//ItemType.cxx #include "ItemType.h" ItemType::ItemType() { …

Member Avatar for raptr_dflo
0
449
Member Avatar for Mona..

Hi .. I have this program, its reding correctly but its not doing what i want i.e. it suppose to read the input file and call the functions according to the action saved in the file this is the problem : [CODE] #include <iostream> #include <Fstream> using namespace std; void …

Member Avatar for Mona..
0
360
Member Avatar for happygeek

[ATTACH=RIGHT]22271[/ATTACH]It's official: Android now has a greater market share than iPhone across the EU5 countries of France, Germany, Italy, Spain and the UK. According to newly published data from the [URL="http://www.comscore.com/Products_Services/Product_Index/MobiLens"]comScore MobiLens service[/URL], nearly one in four smartphone users in the EU5 region were using smartphones running on a Google …

Member Avatar for Swordstech
1
413
Member Avatar for kunal_m

I am working on a project called Payroll Management System... and am using C as the platform. The project will look to ADD..VIEW..DELETE..& EDIT employee details. All this will be done by the Administrator. I have been working on it a bit lately.. and i know before i seek help.. …

Member Avatar for Smeagel13
0
145
Member Avatar for Himajin Breaker

Hello everyone. I am having a problem with my program; it is supposed to read values from an input text file, put the data into a structure, then output the data from the structure into a binary file. The first 2 parts work fine, but I keep ending up with …

Member Avatar for Himajin Breaker
0
420
Member Avatar for gyme20

I have an iPod Touch 2nd Gen, i want to jailbreak IOS5 for it. There may be some jailbreak software or jailbreak methods. Do you know is there any jailbreak method for updating?

Member Avatar for jingda
0
67
Member Avatar for happygeek

Apple has been holding a highly unusual press conference to clam fears about the iPhone 4 and the 'death grip' problems some users have experienced. Unfortunately, Steve Jobs seems to be in two minds about what message to get across. On the one hand he says there is no problem, …

Member Avatar for Johnw2738
0
917
Member Avatar for thecoolman5

Hi, i have an ipod touch 4th generation running IOS 5 and the push notifications dont work. They are all on in settings and still nothing. My ipod is NOT jailbroken and it never will be. Thanks

0
205
Member Avatar for johnnyboyslim

Why is my program failing to close? These names and phone numbers are what I am trying to load into the array and display. Yaztremski 592-48-1003 Tilden 355-71-8210 Charles 290-65-8817 Balboa 458-12-9834 Watterson 234-98-0023 Jefferson 303-41-5692 Carmichael 392-60-0932 Martin 418-77-0974 Davila 339-89-4475 Jacobs 228-42-0547 Dobbs 219-52-4058 Nastromo 628-79-2516 Rivers 611-69-7045 …

Member Avatar for johnnyboyslim
0
93
Member Avatar for _dragonwolf_

Ok, I have been trying to work this thing for a week. It is a program that is supposed to read from 2 files (.dat) and write to a third file (.dat) then update one of the first files. i.e. read oldmast.dat read trans.dat compare data write data and changes …

Member Avatar for vijayan121
0
227
Member Avatar for scobi

Another problem is my program draw lines not Polygon but I want to show POLYGON.HElP ME ASAP.Check my txt file attachement [CODE] #include <stdafx.h> #include <iostream> //line_poly_file.cpp #include <fstream> #include <windows.h> #include <glut.h> using namespace std; GLsizei wh = 250; GLsizei ww = 250; void DisplayLines ( void ) ; …

0
87
Member Avatar for scobi

[CODE]//#include <stdafx.h> #include <iostream> //line_poly_file.cpp #include <fstream> #include <windows.h> #include <glut.h> GLsizei wh = 250; GLsizei ww = 250; void DisplayLines ( void ) ; void MyInit ( ) ; void DisplayLines ( void ) { GLint xj, yj, j; glClear ( GL_COLOR_BUFFER_BIT ) ; fstream inStream; //inStream.open("R.txt", ios ::in); …

Member Avatar for scobi
0
309
Member Avatar for dudekill123

I have created a program store user data in file. But i am only getting one error only but i am unable to debug it. Please help me I used turbo C++ compiler Error is on the line int employee::search_for_employee( int choice, name_temp[20] , email_temp[50]) Here is my code [code] …

Member Avatar for nightcrew
0
152
Member Avatar for aiwagner

I am designing a mobile app for a friend. This is the first time I have used the jQuery Mobile framework, but I am having issues with jQuery's "Latest and Daily Builds" CDN. On my computer (within most browsers), the scaling is fine. Although on iOS devices (and possibly android …

Member Avatar for aiwagner
0
71
Member Avatar for rcmango

Hello, I've created something, its quite large, however I decided to write it without using oop, now I believe I see why I should just use oop. Okay, so the problem is with my bool values specifically: [CODE]button_pickup2 = false; button_pickup1 = true;[/CODE] For some reason when the ReflexAgent function …

Member Avatar for gerard4143
0
318
Member Avatar for khalid_farooq

[CODE]/* * hello.c * This is a simple, introductory OpenGL program. */ #include<stdlib.h> #include <GL/glut.h> #include<iostream> #include<fstream> using std::fstream; using namespace std; void draw(void) { /* clear all pixels */ char fileName[] = "house1.txt"; fstream instream; instream.open("c:/house1.txt",ios::in); if(instream.fail()) return; glClear (GL_COLOR_BUFFER_BIT); GLint numstrip,numlines,x, y; instream>>numstrip; for(int j=0;j<numstrip;j++) { instream>>numlines; glBegin(GL_LINE_STRIP); …

Member Avatar for gusano79
0
617
Member Avatar for nicemark

** hi guys .. i nid to finish it until tomorrow morning .. the Admin [B]USERNAME [/B]is [B]IT2B[/B] and the [B]PASSWORD[/B] is [B]MANALO[/B] .. can someone help me here in my HR SYSTEM .. can you do the edit and delete function for me. or give me a little idea …

0
61
Member Avatar for happygeek

[attach=right]21629[/attach]There is an app for most things, but flying a helicopter has been (perhaps understandably) absent from the list. Sure, you can pilot a virtual helicopter or play a game involving a helicopter on-screen, but how about flying an actual helicopter in the actual sky using an actual iPhone? Griffin …

Member Avatar for harinath_2007
0
416
Member Avatar for Syntax12

Hello! I'm looking for a push in the right direction regarding two topics. 1.) Is it possible to setup a DMZ subnet strictly using one router? with one interface going to the DMZ, another going to the switch for the "secure" internal network, or is it better to use a …

Member Avatar for suley04
0
179
Member Avatar for sgiusti88

I am trying to learn c++ from a textbook (as so many others) but am having a really hard time following this example: Write a program to input and display a sales file. Each input line contains an integer ID number and a sales amount. When the end of the …

Member Avatar for NathanOliver
0
309
Member Avatar for vivek4020

Hi Everybody, I recently did an iOS project. I did the database part only so i couldn't delve much deeper into the project. It basically does something like this. There is a content management server. There is a nice web based UI through which we add/remove content(Product and its details). …

0
71

The End.