132,726 Archived Topics
Remove Filter ![]() | |
How do I write it so if I have ifstream file("file.txt") that has rows of characters like 60 REGULAR NONE GREEN BEGIN REGULAR NONE REGULAR NONE GREEN END that I can read one line at a time and do whatever I need with it. Software Development c++ | |
so im working on my assignment and it says Percentage of ticket revenue which goes to administrative costs. This input will be entered in percent format (see sample runs below); your program must convert this to a decimal fraction. For example, the user enters 25% as 25, not .25; you … Software Development c++ | |
I am trying to replace a string with another string in a string, but it is just not happeneing and is driving me crazy :@ and I am really confused :confused: Here is the snippet : [CODE] Dim strHex2 As String strHex2 = strHex.Text Dim Mystring2 As String Dim GG … Software Development visual-basic | |
Thank you in advance, i have starred at this for a couple hours now and i have come to no conclusions. First off, this is an assignment to teach us how to use header files, this is the header that we were provided with: Complex.h [code=syntax] #ifndef Complex_H #define Complex_h … Software Development c++ | |
[code]#include <iostream> #include <iomanip> #include <cstring> using namespace std; int main() { char name[40]; double date1; double date2; double date3; double h1; double h2; double h3; // Name of pole vaulter cout << "What is the name of the pole vaulter? "; cin.getline(name,40); // Month1, Vault1 cout << "What was … Software Development c++ | |
I was just wondering if there was another way to out put text besides cout? I know this probablt sounds weird because cout works perfectly fine and stuff, but I just want to know if all of the input/output has to be done in a cprompt window? Dose anyone know … Software Development c++ | |
Hello, my question is how can I read decimal from txt file? For Example expression "2.0 1.3 +" - postfix to calculate it. The one that I have right now work for integers but when it starts reading it chops of the decimal part. I can figure out what i … Software Development c++ file-system ios | |
Hi , As posted on a previous tread , i am very new to this whole programming thing...(just starting out) I am trying to write a small program to copy folders and every thing in it to a different location? The Platform is Wince .net (4.2 embedded). I can create … Software Development c++ | |
I'm making minor adjustments to a sample program called [b]pdemo[/b] that comes with Dekang Lin's [b]minipar[/b] parser, but I'm having trouble compiling the darned thing without seeing a royal mess of "undefined reference" variables. I'm not particularly well-versed in C++ (I'm far better with higher-level languages), though, so I'm sorry … Software Development c++ open-source python ubuntu | |
[code=cplusplus] string countx(string sky) { int count=0; for(int x=0;x<=sky.size();x++) { if(sky[x]=='x') { sky.erase(x); ++count; } } stringstream ins; string bang; // Declare an input string stream. cout<<"count " <<count; ins << count; bang = ins.str(); sky=sky+"x^"+ bang; cout<<"Sky == "<<sky<<"\n"; return sky; } [/code] Writing a function that will take … Software Development c++ | |
When reading a txt file I am using .seekg to set the startpoint in the file to read from. linepos has a value: 1002106 First I wonder what this value stands for excatly. As I have understand this is how many characters forward in the file that will be the … Software Development c++ | |
[code] void myClass<temp_Type>::myFunction(myClass<temp_Type>* &firstClass, myClass<temp_Type>* secondClass) { } [call] myFunction(*this, &secondClass); [/code] I think I am fundamentally challenged on the "this" qualifier. I want to pass a pointer to the current object(ie the object I am calling the function from), but am stuck trying to pass the "this". Are there … Software Development c++ | |
Hiii I m just a beginner in C++...Was using turbo c++v3.0... Now just installed Visual c++ 2008 express edition.... Anyone please let me know the main differences between TC++ and VC++?.... how can i make a simple programme written in tc++ run in vc++..which are the modifications?... ".H" could be … Software Development c++ | |
As a homework assignment, I was asked to write a program in C++ that calculates the sum of the even and odd integers in a list of integers given by the user. I think I'm on the right track, but I can't seem to get my loop right. Here's what … Software Development c++ | |
I am trying to make a frame with a label and a button and cannot get it to work. Im not sure what im doing wrong. [code]import java.awt.*; import java.awt.event.*; import java.io.*; import java.lang.*; public class Program3 extends Frame implements ActionListener, WindowListener { private static final long serialVersionUID = 1L; … Software Development java | |
I am stuck, im trying to insert and print out this list of numbers from a file, however i just get an infinite loop every time... any suggestions? [code=c++] // This is the implementation file for class List #include <iostream> #include <stddef.h> // to access NULL #include "List.h" #include<fstream.h> using … Software Development c++ | |
I made the game Mastermind using C++ and would like anyone who wants to test it and let me know what they think. It comes with instructions, but since I wrote them and I know how to play the game, they might not be clear. Note: If this post is … Software Development c++ | |
Hi I'd like to use an array to store values of particular things. I would like names to correspond to each value in the array. What I was thinking was, should I perhaps create 2 arrays: String[] and int[]. Then, when I call data from say example_int[1] I call the … Software Development java | |
I'm trying to make a program that will read names and numbers from a file, but I'm quite inexperienced in C++ in general, and most tutorials and help threads I read tend to make me confused. So far, I have used a test file with a text like "NameA 01234 … Software Development c++ | |
this code is a game that uses socket to be able to connect to each other so that there would be a 2player game.. but there something wrong here...here's the code..i'm using linux as my operating system ..this is the client side.. [CODE]#include <stdio.h> #include <iostream> //#include <conio.h> #include <stdio.h> … Software Development c++ client-server operating-system socket-programming windows-server | |
hey guys, im trying to write a program recursively that takes in how many times the user wants to flip a coin, and prints out all the possibilities. i am having a hard time figuring it out. id apreciate some input. here is the code i have so far... [code] … Software Development c | |
How do i get it to cout what the pointer points to and not the pointer address? [code] int main() { Item* items[10]; items[0] = new Item(5); items[1] = new Item(3); items[2] = new Item(4); items[3] = new Item(9); items[4] = new Item(2); items[5] = new Item(0); items[6] = new … Software Development c++ | |
the below code is to allow user to enter many strings of characters until he enters a fullstop (.) Please tell me how can i calculate the total number of strings the user has entered. #include <iostream> void main() { char a[80]; int i,c=0; for(i=0;;i++) { cin>>a[i]; if(a[i]=='.') break; } … Software Development c++ | |
hi all! how do I multipluy values inside the array I have tied the following but the compiler is giving me a error double a=(h[0]*b[1])+...... Software Development c++ | |
Hello people, I need your advice, what to do. I use LINQ stored procedure to select all data from sql table to DataGridView: EtiketyLINQDataContext EtiketyData = new EtiketyLINQDataContext(); IEnumerable VypisDat = EtiketyData.Vypis("Cislo", "Typ", "Hrubka", "MaterialTyp"); LINQdataGridView.DataSource = VypisDat; The problem occurs with this line: `IEnumerable VypisDat = EtiketyData.Vypis("Cislo", "Typ", "Hrubka", … Software Development | |
Hey everyone, I'm a new python user. I'm running SuSe linux development 10. My problem is with importing files. Here is my file - it uses the myro library for robot programming. /dev/rfcomm0 is the name of #helloWorld.py from myro import * init("/dev/rfcomm0") def hello(): forward(.5,.5) stop() hello() --- From … | |
hai i have few .bak files like (abc1.bak,abc2.bak) are stored in sample.xml file.I need to Retrieve those .bak files and store in c:\ drive plz help me...... thanks in advance chinnareddy Software Development xml | |
Hi! Can anybody please help me to add many strings in one? I tryied this int a=4,b=5,c=6; string d; d = #a+" Hello "+#b+" bye "+c; I want that d = 4 Hello 5 bye 6 Please help me! Software Development c++ | |
hai , i have a sever in that thare are Z and E drives are there.i have .bak files in Z drive.i need to copy all .bak files into E drive by using c#.net . plz help me........ thanks in advance.... regards chinnareddy Software Development | |
I have this problem where you have a list of odd or even number of items in doubly link list and you have delete the middle one. For the even number one you delete the two middle elements, say you have 1,2,3,...,10 you delete 5 and 6, and for the … Software Development c++ linked-list | |
hello! im trying to make a program where entered values should be displayed in a tabulated form. however, as far as i know, everytime we enter a value and press ENTER, the cursor goes to the next line. is there any way where in if a user enters a value … Software Development c++ | |
hii friends..Am new to this community... am a computer science student... I need your help in creating a small c++ game... Its a project for me... I am told to do it in turbo c++... okay... the game is so simple... [U][I][B]A number memory game... random numbers should be displayed … Software Development c++ | |
[code=cplusplus] #include <iostream> #include <iomanip> #define _USE_MATH_DEFINES #include <cmath> using namespace std; double meanOf3(double value1, double value2, double value3) { double mean; mean = (value1 + value2 + value3)/3; return (mean); } int main() { float value1, value2, value3; double mean; mean=0; cout <<"Enter the first integer whose square root … Software Development c++ | |
I have got 2 problems... 1) How can I find the visible no. of rows in a datagridview and the index of the top row during vertical scroll.I am using visual studio 2005 windows application in c#. 2) How to refresh datagridview's particular no. of rows instead of refreshing the … Software Development dataset visual-studio | |
Hi again, I worked out my other problem. But now am having problems passing an array from one form to a textbox in another. I have taken items from a listbox and added them into an array. To pass the array into the following form I have used; [code] Form … Software Development | |
Heya I have to write a script within MS Access 2003 using Visual Basic for Applications to read in data from a textfile and insert it into the table. I began my programming path using dot.Net C# and started database manipulation using Sql Server. So this is kind of like … Software Development microsoft-access visual-basic | |
Hi Cud anybody help me in sorting out this issue???...i have written a java code which fetches a text fils as an input & displays the output. Now i want to display the output in an existing Excel file in a desired format. import java.io.*; class hi { public static … Software Development file-stream java | |
hi friends, First I want to introduce myselt, I am Aditya and have little knowledge of programming because I have enter in this field just os i face problem with c and need your kind solution, your reply would much valueabel for my bright future... I have a problem in … Software Development c | |
I am a student who is taking a computer science course in college and have been assigned to write an algorithm for a java program. I have no previous programming experience and I am really behind in this class. It seems fairly simple and anyone on here could probably do … | |
Hi there ... I need help with the following program.It is giving me error. Thanks very much. [CODE=c] /*Write a structure function to enter Roll number, Name, Department, Course, Year of joining and print them out */ #include <stdio.h> struct student { char name; char dep; char course; int roll; … Software Development c | |
i need help with a homework problem, it's writing a program that approximates the sum of 1 + x/1! + (x^2)/2! + (x^3)/3! + ... + (x^n)/n! we're supposed to write a program that takes a value x as input and outputs this sum for n taken to be each … Software Development c++ | |
I need to check if any "File Download" dialogs are open, which means I am downloading something so that my program will not attempt to download 2 files at the same time. I have no clue on how to do this and need help. Thank you. Software Development vb.net | |
In my VB 6 code, I had many classes and depended on the ability to loop through the objects to get at the data. How is this done in VB.NET? Here's a very simple example of what I'd like to be able to do in VB.NET. In my Accounts class … Software Development vb.net | |
umd = New OleDbCommand() umd.CommandText = "UPDATE STUDENT SET roll = ' " + TextBox1.Text + " ' , name = ' " + TextBox2.Text + " ', marks = ' " + TextBox3.Text + " ' " & " WHERE roll = ' " + TextBox1.Text + " ' … Software Development vb.net | |
I want to understand the JDBC thoroughly (i.e. all 4 types of drivers). Any body can help me in the following. I have searched for the resources to clear this for the past 6 months. But I can't able to clear these. 1. Difference between the 4 types of drivers. … Software Development java | |
Hi, I'm new to C#. Can any one help with extracting info from a few .csv files and insert them into DIFFERENT sheet in excel(not necessary .xls format. .csv is fine). I'm not asking for the whole piece of coding. Just need some idea on where to start. :-/ Thanks! Software Development | |
Hi there, I just saw the thread about helping with assignments but I'm hoping you will be able to share your knowledge with me on this. We have had one week to complete this assignment and I'm beginning to worry I won't be able to finish it, I've tried to … Software Development c c# c++ user-interface | |
Im New to the community, im having difficulty in trying to attach code to a password program that will open folders once the correct password is entered. Any ideas on how to do this??? Software Development visual-basic | |
hi Friends, I have used sizers for one of my frame which has Checklist box. THe checklist box is not displayed at first but on slight resizing the Checklist box is displayed. Please assist in this regard. Regards Dinil | |
I need to print the following array and am not sure how to do so. It uses an object which is already created named TimeAT.... i mport java.util.Scanner; import java.util.Random; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** … Software Development java |
The End.