2,025 Topics

Member Avatar for
Member Avatar for VanessaRyan

A [URL="http://bit.ly/appcelerator_idc_q4_mobile_developer_report"]new survey[/URL] jointly conducted by Appcelerator® and International Data Corporation (IDC) released September 27, 2010 reveals Appcelerator Titanium developers favor Android over iOS in TVs and other devices.[ATTACH=right]17397[/ATTACH] Although the market shows that Apple currently leads in iPhone/iPad sales and popularity, the survey reveals that of the approximately 2,300 …

Member Avatar for peter_budo
0
535
Member Avatar for FoxInBoots

Hi, I really need help with understanding how to solve an exercise. Create a new textfile with the name 'studentinfo.txt' and write following and save: Marie Anderssen 29 Alexander Lind 35 Gholam Payro 32 Zlatan Ibrahimavic 26 Write a program that read the information from 'studentinfo.txt' and calculates the average …

Member Avatar for Narue
0
192
Member Avatar for happygeek

News reports suggest that March has been a good month for lovers of, and developers for, the Android operating system in pretty much every regard. That good news comes at the expense of the Apple iPhone and iOS we are led to believe, which appears to be losing the fight …

Member Avatar for wtstalin88
2
813
Member Avatar for Soulstorm

So we were offered a job yesterday, which involved developing a mobile app targeting multiple platforms. They need the code to be as cross-platform as possible, so I think that C++ is the way to go as far as the infrastructure is concerned, and then we write wrappers in other …

Member Avatar for mike_2000_17
0
154
Member Avatar for WASDted

[ATTACH=RIGHT]19552[/ATTACH]Hey folks, Apple has [URL="http://www.apple.com/ipad/"]launched the iPad 2[/URL] with some pretty cool improvements... The new pad gets: [LIST] [*]New Dual-core A5 processor = up to 9x faster performance, better graphics [*]New, thinner design = 33% thinner and 15% lighter [*]Two cameras (front and rear) = FaceTime, HD video shoots, Photos, …

Member Avatar for jingda
0
300
Member Avatar for king03

Hi there guys I am having trouble with a particular input in my program. If you will run my program and enter the word "IT" in Enter Course, it loops and jumps to do you wish to return to the main menu. Please use Microsoft Visual C++ 6.0 Professional Edition …

Member Avatar for m4ster_r0shi
0
199
Member Avatar for AW8Dragon

Hello everyone, this is my very first post in this webpage so here we go. I've got this problem with my hw assignment, it's almost finished except for one part. The hw is as follows: - Create an address book, creating 4 text files in the computer memory. Each text …

Member Avatar for AW8Dragon
0
408
Member Avatar for king03

Hi there guys I am looking for a way on how I can increment an object from a structure which is an integer type. the string types I have Increment well but the int types do not. it says int[int] is invalid for array subscript. The red font on my …

Member Avatar for WaltP
0
119
Member Avatar for king03

Guys I need help. When I am already done inputting the needed information, when it comes to outputting file stream to a notepad it stops and says "program.exe has stopped working. windows is checking for a solution" and there is a loading bar. please help i don't know what I …

Member Avatar for Arbus
0
169
Member Avatar for SasseMan

Hello all! I'm having problems with running c++ on iOS. I have a iOS openGL project in Xcode 4 and an external library written in c++ that has to be a dependency to the iOS target so it can run on an Ipad. right now I'm testing with the iPad …

Member Avatar for SasseMan
0
105
Member Avatar for yoni0505

I had a problem with some program I wrote that edit specific values within a specific file. When I saved the values, using fstream's write() function, everything between these values became null. I've looked again in the I/O tutorial - [URL="http://www.cplusplus.com/doc/tutorial/files/"]http://www.cplusplus.com/doc/tutorial/files/[/URL] and saw that they use memory block at the …

Member Avatar for yoni0505
0
363
Member Avatar for Rickay

Hey people. Been having a problem when trying to use .gif files as images for sprites. When I try to use one, I get an error such as: [CODE]Documents/Code/Cocos2D/Cocos2D/Player.png: No such file or directory[/CODE] But in the code, I am calling for the picture "Player.gif" to be used, as you …

0
110
Member Avatar for yoni0505

Hi I have a problem with a code I made, some save editor for some game. The code suppose to write 2 bytes to a specific offset in some file. The file's short integers are saved as little endian. everything works fine, but when one of the integers equal 10, …

Member Avatar for yoni0505
0
207
Member Avatar for Derek Elensar

This is my final project for my C++ class online. I was instructed to make a test and to pull answers from withing a .txt file and compare them to the answer that the user inputs. I'm sure there's a much easier wau of doing things than the way I'm …

Member Avatar for Derek Elensar
0
230
Member Avatar for curly3top

help me please :sad: if you can find out what's wrong w/ my program, please do tell. thanx very much! #include <iostream> using namespace std; void get_start(int start_hour, int start_min) //Precondition: User is ready to enter the values for the hour and the minute. //Postcondition: Values in hours (24-hour notation) …

Member Avatar for pseudorandom21
1
227
Member Avatar for pok.kys90

I am new to c++ and i am supposed to do a test case using my stub with hand calculated mean & standard deviation of number of students that are saved in the .o file in linux. my code is [code] #include <iostream> #include <fstream> #include <cmath> using namespace std; …

Member Avatar for pok.kys90
0
244
Member Avatar for guilt99

Hi, i am sure most people here are subscribed to some feeds to keep up with the news, i am subscribed to around 8-10 feeds, and they give me 300+ updates everyday, but i am only interested in about half of them.. some of them are the next web, tech …

0
61
Member Avatar for zeronis

Hi! Using string, ifstream and ofstream object. Compiling - ok, but give a run-time error after printing Name in ReadData() function. My Person class include only one string member "name" and function "Name()" which return string object "this->name". And constructor with string parameter of course... [CODE]#include <iostream> #include <fstream> #include …

Member Avatar for Narue
0
221
Member Avatar for shilosimi

Hi. I'm trying to delete a line from a Db file that I've created. I'll explain: I'm making a Db of people, which is consisted of id, first and last names - each one in a different line. When I want to delete a record, I wanted to copy the …

Member Avatar for tkud
0
170
Member Avatar for hiddepolen

Hi, I have a piece of code, which gets a string of code from a webpage. It's the HTML source code, from which I want to make an array, in which I can find data the user will input. However, I need to extract all the useful information from the …

Member Avatar for Prabakar
0
201
Member Avatar for FoxInBoots

I've tried but I don't understand how to use void, can someone please try to explain how it works in a simple way. [CODE] #include<iostream> #include<conio.h> #include<iomanip> using namespace std; float areacalc( float rad); float circumcalc( float rad); void output(float A, float C); void input ( void ); float radius; …

Member Avatar for FoxInBoots
0
163
Member Avatar for dan2011

I'm a newbie at C++. I can't figure out why my program won't build. Could someone please help? I get the error [QUOTE]1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup 1>c:__namestuff__.exe : fatal error LNK1120: 1 unresolved externals[/QUOTE] [CODE]// File : name.cpp // Description: Does stuff with stock // Programmer: …

Member Avatar for predator78
0
86
Member Avatar for watery87

Hello, would like to ask about this problem im facing. [code] #include <cstdlib> #include <iostream> #include <fstream> #include <ios> #include <string> #include <string.h> #include <vector> #include <sstream> #include <algorithm> #define MAX_MSG 30 using namespace std; vector<UserInit> ReadUsersInitial() { fstream file ("Users_initial.txt"); FILE *file1 = fopen("Users_initial.txt", "r"); string tempFile; if (file.good()) …

Member Avatar for drkybelk
0
126
Member Avatar for WASDted

Rumor has it that Osama Bin Laden received his new iPad 2 and instantly became target #1. That's right Mr. Al Qaida, had you [URL="http://www.daniweb.com/hardware-and-software/apple/ios-iphone-os/news/361140"]read the editorial threads on DaniWeb.com[/URL] you would have known that Apple is watching and recording your moves. In a heroic effort to end that war …

Member Avatar for Agilemind
3
549
Member Avatar for DerrickC

I have written the following program. It collects inventory information and stores it in a file. I need to write a separate program that will access that file and give me the totals of the information stored in it ie. (quantity,wholesalecost,retailcost). What I'm specifically having trouble with is how to …

Member Avatar for DerrickC
0
184
Member Avatar for Red Dragon

the aim of this programme is to create a .txt file (of which the name is specified by the user) of all the items in a certain directory (also specified by the user) the problem is about half way down, the 'mydir' bit [CODE] #include <iostream> #include <fstream> #include <string> …

Member Avatar for Red Dragon
0
360
Member Avatar for Derek Elensar

I have another problem... Let's start with said code: [code] #include <iostream> #include <fstream> //I have tried using fstream.h like my teacher instructs me to do/ #include <cstdlib> //but it gives me another error: see below, in actual post. using std::cout; using std::cin; using std::ios; using std::endl; //using namespace std; …

Member Avatar for Derek Elensar
0
1K
Member Avatar for ilnura

ookay people, here is the code c++; im trying to read BMP image file. [CODE]#include <iostream> #include <fstream> using namespace std; void listing (void) { unsigned char pixel; int x, pix; ofstream debug("debug.txt", ios::out); ifstream inpaint( "source.bmp",ios::binary); if(!inpaint) { cout << "File not opened\n"; exit(1); } for(x=1; x<=54; x++) { …

Member Avatar for ilnura
0
145
Member Avatar for Billy D

[CODE]string currentUser() { string user; ofstream outf("CurrentUser.dat", ios::trunc); system("whoami >> CurrentUser.dat"); outf.close(); ifstream inf("CurrentUser.dat"); inf >> user; return user; }[/CODE] This is a function that gets the name of the current active user. It creates a data file, with the contents being the username. The problem is, to create a …

Member Avatar for TrustyTony
0
184
Member Avatar for something_techy

Hello, I am trying to read exact 2 bytes from binary file, and transfer it to int, whatever is it 2 or 4 bytes. Atm on my computer is 4 bytes. So I have two bytes into four bytes scenario. I am using this code [CODE]ifstream in_stream; in_stream.open("test.dat", ios::binary); streamoff …

Member Avatar for Narue
0
304
Member Avatar for Derek Elensar

I have said program: [code] #include <iostream> #include <fstream.h> #include <conio.h> using std::cout; using std::cin; using std::ios; using std::endl; int main() { char first[6]; char middle[16]; char last[16]; int counter = 0; char temp; cout << "Please enter your first, middle, and last name:\n>"; cin.get(first, 6); cin.ignore(80,'\n'); cin.ignore(80, ' '); …

Member Avatar for Derek Elensar
0
205
Member Avatar for Rickay

[CODE]double speedTest() { double dInitialTime = clock(), dFinalTime = 0; double dRepititions = 99999999; double dResult; cout << "\nCalculating...\n\n"; for(int nCounter = 0; nCounter <= dRepititions; nCounter++) { pow(dRepititions, pow(dRepititions, dRepititions)); } dFinalTime = clock(); dResult = dFinalTime - dInitialTime; ofstream outf("Results.dat", ios::app); outf << dResult << endl; return dResult; …

Member Avatar for Rickay
0
6K
Member Avatar for Trustify

I don't know what I'm doing wrong but I open my filed correctly but it doesn't display the contents in the file. Please help. [CODE]#include <iostream> #include <fstream> using namespace std; int main() { const int SIZE = 81; char input[SIZE]; fstream dataFile; dataFile.open("info.txt", ios::in); dataFile.getline(input,SIZE); system("pause"); return 0; }[/CODE]

Member Avatar for Trustify
0
163
Member Avatar for woody0114

alright I need help and at this point I am desperate. Been working on this for a couple of days, mostly typing and then hitting the Edit/undo! This is a homework project. What the project is supposed to do is: 1. open a text file(einstein.docx) 2. Prompt user for a …

Member Avatar for woody0114
0
939
Member Avatar for Derek Elensar

Ok, so this is going to be a basic question that I should probably know, but it's baffling me right now... Also, be prewarned that this is a homework assignment I'm working on. I don't want answers, just guidance. I understand what I need top do(for the most part. obviously …

Member Avatar for Derek Elensar
0
177
Member Avatar for dodgers

Hey. My program wont write the input data to file. It seems like the userdata variabels doesnt get updated after input from the user. Can anyone see what i have done wrong? This is what i have done so far: [CODE] // userdata.cpp // class userdata store user information #include …

Member Avatar for Moschops
0
168
Member Avatar for pepperhead11

Ok, I've been trying to run this program on Borland C++ (Version 5.0A). The program is a Point of Sale program. I keep getting the errors "expression syntax at (121,26)" and "If statement missing ) at (129,6). Try as I might, I can't seem to fix the errors. Help? [CODE] …

Member Avatar for WaltP
0
1K
Member Avatar for aprilchica3

Hello, I have spent numerous hours re-working this code and I hope someone can clear up my confusion! This program asks the user to enter a file name which will then create and display that file with a poem in all caps. The user is again prompted to enter another …

Member Avatar for aprilchica3
0
178
Member Avatar for britanicus

This is a part the extension module im writing for python using c++. ( The complete source is available as an attachment ) [CODE] #include <python2.6/Python.h> #include <iostream> #include <fstream> #include "structmember.h" using namespace std; typedef struct { PyObject_HEAD fstream file; } CppFileObject; static int CppFile_init( CppFileObject *self, PyObject *args …

0
78
Member Avatar for pritpal.singh88

[code]ofstream f; char c; f.close(); f.open(s.c_str(),ios::out); if(f.is_open()) { cout<<"Press <q> to save file"; char *text; int count=0,count1; while(1) { system("stty raw -echo"); cin>>c; cout<<c; system("stty cooked echo"); text[count]=c; ++count; if(c=='q') { text[count]='\0'; while (text[count1]!='\0') f.put(text[count1++]); f.close(); break; } } [/code] please help me out in this syntax i was not …

Member Avatar for jonsca
0
111
Member Avatar for marrkee

hello, I'm almost done it, but I'm lost in the huge forest of c++... so, here's my code: [CODE]#include <iostream> #include <fstream> #include <time.h> #include <stdio.h> using namespace std; int gettime() { time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); } int …

Member Avatar for marrkee
0
144
Member Avatar for jmcginny5

So I have the code written, and it is compiling fine. But for some reason, when I compile it and it displays the results, the way it displays isn't the way it should be. It is supposed to pull information in from a binary file. Here is the link to …

0
81
Member Avatar for Muhammad Anas

I am trying to create a program that, after inputing a text file, can: 1) Count number of lines in the text file. 2) Count number of words in the file. 3) Count number of characters in the file [B][U]including[/U][/B] white spaces. 4) Count number of characters in the file …

Member Avatar for Narue
0
2K
Member Avatar for atticusr5

Hello all, I am trying to debug some code that I have come across. It is an array based BST, and I can not figure out why the parent's are not being recorded correctly. Essentially the first few inserts work, and then the parents become incorrect. Can anyone give me …

Member Avatar for mike_2000_17
0
148
Member Avatar for toferdagofer

i am writing a decryption program that reads a file from another project solution and decrypts it then writes it to a new file in its own project folder. For some reason when i try and read the file in the program says that file doesn't exist. Im pretty sure …

Member Avatar for Moschops
0
161
Member Avatar for shyla

A file filter reads an input file, transforms it in some way, and writes the results to an output file. Write an abstract file filter class that defines a pure virtual function for transforming a character. Create one subclass of your file filter class that performs encryption, another that transforms …

Member Avatar for shyla
0
1K
Member Avatar for ashrafu1

hello am doing a library program. i am almost done with it. but now my problem is i have to make the record update section work as each of the record can be updated separately. so far i think of making another menu and do it like that. now my …

Member Avatar for ashrafu1
0
458
Member Avatar for sahil1991

hello frndzz... just wrote a piece of code in c++....bt this didnt create any .DAT file as expected.....dun knw wats wrng.... #include<fstream> #include<iostream> using namespace std; class person { int age; char name[40]; public: void get() { cout<<"enter age:"; cin>>age; cout<<"enter name:"; cin>>name; } void show() { cout<<"age is:"<<age<<endl; cout<<"name …

Member Avatar for daviddoria
0
136
Member Avatar for mugenoesis

okay i've got a problem with this code its going to be a apart of a word guessing game, the problem is that my code reads the file i want it too, but when i ttry to guess the letter it will only read the first letter, i know that …

Member Avatar for daviddoria
0
171
Member Avatar for BMPaul

Hello, im a noob with C++ at the moment and Im trying to create a BMP image from pixel data stored in a array. Everything seems to work except that when i look at the file generated in a hex editor i get an extra '00 00' in between the …

Member Avatar for gpyrounakis
0
2K

The End.