49,761 Topics
| |
#include<iostream> #include<fstream> using namespace std; void main(){ ifstream inf("data.txt"); char name[30]; while(!inf.getline(name, 30, '|').eof()) { char jersey_number[10]; char best_time[10]; char sport[40]; char high_school[40]; inf.getline(jersey_number, 10, '|');// #read thru pipe inf.getline(best_time, 10); // #read thru newline inf.getline(sport, 40, '|'); // #read thru pipe inf.getline(high_school, 40); // #read thru newline cout<<"jersey number: … | |
hey guys, i'm using Borland 6 c++ in windows xp, now that we got that i have a problem with my program, i have recently created a password function in a programm that works so that when they try to type in their password it shows the * instead of … | |
How to use Data base connectivity in c++, files are not very useful.. | |
Hello, I have just installed Microsoft Visual Studio 2005 and it has the folowing to select, under C++ projects selection: ATL; CLR, MFC and Win32. Now Id like to know what are ATL, CLR and MFC and what is each of them used for, Anyway does anyone know when will … | |
I'm trying to find the min/max of the number of years played and the min/max batting average of a list of players in an input file inputted in by the user that looks like this, the file is read and checked and then the program goes and gets the name, … | |
23Zone Hey, I'm new here and new to C++ and I've been learning it pretty quickly. Today my teacher gave the class a problem to do involving loops. It was, for me, pretty simple because we had just went over it. I completed the problem, well that is what I … | |
somebody help me pls... my task is to search a value that matches to my csv file. my csv file contents is like this: 0,"100","WA" 101,"201","BC" 202,"302","EC" this should be the scenario. enter value: 205 output: BC pls include the codes.. i am just a beginner.. thanks in advance.. | |
Hey all, I'm new to this forum, first post.. so please excuse me (also excuse the perhaps not so eloquent style, it is still in preliminary!) =). I'm writing a short piece of code in compliance with a webserver I've been programming with a group. This code is to auto … | |
I cannot figure out how to "call" the functions into the main. Please help!! [code] // ****************************************************************** // // Grades.cpp // // This program computes student grades. For each student, two // quiz grades (graded on a 10 point basis), one midterm exam grade // and one final exam grade … | |
hi, i want to make a program simular to this:: [url]http://www.daniweb.com/code/snippet356.html[/url] but i want it to use Strings not char arrays.... PS::In other words i want to binary write a class-struct which contains a string member.....I think the fact that string is of arbitrary size, creates problem... | |
Hi all...my first post here...WOOHOO!! Ok...now to the meat of the question... I'm a student at the the local JC in an intermediate C++ class...I'm having trouble understanding pointers...I just can't seem to get the full concept through my head...Can someone tell me how they finally "got it"? I understand … | |
Just registered but you guys have been a big help for the whole semester. I have what seems to be a simple problem but I'm just stuck. My assignment is a game of life sim that prompts the user for an input file, and then reads integers from the file … | |
Hey what dod i need to do inorder to get my program to print out 2 decimal places after gross amount and amount donated? you will see what i mean when u run my program. for example i need it to print out $100.00 not just $100. [CODE]#include "stdafx.h" #include … | |
| |
I had posted a while ago about how to put a picture in a game to make it look a little more real. my friend said i should a gui. Does anyone know of a site or how to do this using microsoft visual c++? | |
I am very confused with ADT. I get the concept of why to use ADT, but I dont know how to implement it. The problem I have to solve is to merge 2 sorted list using ADT functions provided. The ADT functions are the functions in my header file. Here … | |
need help in image quantizing using borland c++.. i do not have much knowledge about it.. got to change a 24bit image to a 8 bit image...do not have any idea on how to do it.. pls help... and the deadline is in 24hrs time.. thanks | |
I am writing a program to batch rename files. I am trying to take the file name (which include folders) and remove everything before the last slash. The problem is that LastIndexOf("\\") always returns -1, even if the string contains a "\". And the Remove(0, index) doesn't ever remove any … | |
Hi, I am writing a little program in C++ that is used to read a file which contains several paragraphs. The paragraphs are not indented and there are a blank line or sometimes two blank lines before the start of each paragraph. I have written the program and can read … | |
:?: Q) who translates the code into machine language in c++. compiler or operating system | |
hi i am trying the following code to print the message. it is working well in a system having a printer connected through com1. But is not working in other system that using usb port. what should i do. ofstream outfile; outfile.opne("PRN"); outfile<<"\nThis is test printing"; outfile<<'\x0C'; | |
:p hi ,this is my first visit to theis web , i hope to help me, i need afull c++ programm of game called "pebble chess" , this game can execute on algorthims called "minmax", and iwill describe this game: 1- each player turn consists of moving one or more … | |
who will convert the code in to machine language in c++ 1)compiler 2) operating system:?: | |
Hi friends, I am back. I was doing some hands-on with the C++ and I think I am a bit confident now :) I came across an Exercise question in a C++ book which is as follows: There is a structure with the variables payment_amount, method_of_payment and risk or priority. … | |
Hi fellow c++ programmers, I need some help with an assignment from my c++ class. The assignment is to use a input file with the following 1 4/12/2007 34 -- 1 is the reference number, date , and temperature to be converted to farenheit. Now i have to output it … | |
Can anyone tell me why I'm getting build errors on the actual function heading and the line under it (**) saying "type bool is unexpected" and that I'm missing a ; before {? I've looked and can't find anything. Also, I get this error but there is no line 80 … | |
In borland there is a function gotoxy to position output to the screen is there a command in visual c++ 6.0 that does this. | |
am using tc3 i want to search files in a folder named "project" on c drive this folder contains some text files namely 2-2AA 2-2BA 2-2CA 2-2DA LOG i want to search how many files are there excluding LOG so that i can open them one by one and manipulate … | |
Hi! I'd like to know how to print something when the user ends the program (with ctrl-c for example). An example is the "ping" command (in most linux versions), that gives the average ping when the user terminates it. Thank you! | |
hello dears! i have a question about my program i am suposed to make a program that calculates thea factors of a number and add them and see if the number is a perfect number. i made this program and it works fine but now i have to change this … |
The End.