197 Topics

Member Avatar for
Member Avatar for srednakun

Hello My problem is I am calling a method in my main but this method doesn't have any code written in it, and yet I am getting an output of numbers approximately 10 digits long, and a negative value. For example, in my main I have: [CODE]Date d1(9,20,2011); // Date …

Member Avatar for pavangajula2007
0
227
Member Avatar for naffan

Hi all, Quick question, Is there a way to store a GregorianCalendar object in a hard-coded array? Such as you do an int or String ? Or do I have to send 3 ints for dd/mm/yyyy and then create a new GregorianCalendar object in the Constructor? If this is the …

Member Avatar for naffan
0
208
Member Avatar for thecoolman5

hi, i have this code [CODE]#include <fstream.h> #include<iostream> using namespace std; int main (char argc) { for(;;) { fstream file; file.open("file.txt"); cout << "Enter new high score." << endl; double n2; cin >> n2; double n1; file >> n1; if(n1 > n2) { cout << "You didn't beat the high …

Member Avatar for thecoolman5
0
1K
Member Avatar for byrosport

Okay the text on my input file is Wxmv_bpm_xwl_jig_lwwza,_PIT._Q'u_awzzg,_Lidm._Q'u_inziql_Q_kiv'b_lw_bpib. Here's My code but for some reason I can't get my program to convert the message to my output.txt file. Can someone please help thanks [CODE] #include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main() { string str; int …

Member Avatar for byrosport
0
270
Member Avatar for CodeAerial

I am making a program the enqueues a number at index 0. I also made a function for it, as written below: [CODE] //main #include <stdio.h> #include <stdlib.h> #include "functions.h" main(){ int *queue = NULL; int size, choice, aNumber, numberOfQueues; do{ printf("Enter Array size: "); size = input(); allocateMemory(&queue, size); …

Member Avatar for nezachem
0
161
Member Avatar for zooby

I have the following template that I am using to upload files into AMAZON S3. I'll display the template right here: [CODE]<cftry> <!---ACCESS KEY ID = SECRET ACCESS ID = BUCKET NAME = cic-audio FILE NAME = amazon_s3_test.txt---> <cfparam name="URL.step" default="view"> <cfoutput> <cfif URL.step eq "view"> <cfscript> // IMPORTANT: Set …

Member Avatar for matricol
0
266
Member Avatar for hwalsh

I'm having an issue that I've been working on most of the day. I want to get the user name, then return it twice, but can't seem to get the variable right. Here is my code. [CODE]import java.util.Random; import java.util.ArrayList; import java.util.Scanner; public class mlab { // instance variables - …

Member Avatar for FALL3N
0
343
Member Avatar for 7sisters

Hi, I am really new to Python and I am having real trouble with this new language. This is what I want to do: I have two sets of .txt files that contain numbers. They look like this: FILE1 1028.085 283.795 2056.13 295.254 121912.4 11.346 0.004 147.932 780.677 966.771 289.326 …

Member Avatar for 7sisters
0
156
Member Avatar for Muhammad Anas

I just found a question whose statement is as follows: [COLOR="Green"]Write a function contains(const char*, char) which returns the pointer to the first (left-most) occurrence of the 2nd parameter char in the 1st parameter cstring, or NULL if the cstring doesn't contain the char. [/COLOR] Another condition is that inside …

Member Avatar for Muhammad Anas
0
262
Member Avatar for IcantC

Hello, forum. My question is: how can I format my output when outputting in JTextArea. I want to have the same functionality as System.out.format has (custom spaces between values). Maybe it is possible to print PrintSream objects in JTextArea? I am currently using append(String s) method but I am not …

Member Avatar for IcantC
0
720
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
356
Member Avatar for Iamthecheese

I have a program that runs a binary search tree and lists a menu of options. Two of the options are the only ones I can't seem to get to work which are saveToFile and buildFromFile. These methods include asking for a name to save as an output file (save) …

0
181
Member Avatar for clickspiker23

Im trying to read from a file using classes and objects. i keep getting this error [CODE]main.cpp:16: error: no matching function for call to ‘Game::fillGame()’ Game.h:41: note: candidates are: bool Game::fillGame(std::ifstream&)[/CODE] here is code that goes with the error [CODE] //Game.h bool fillGame(ifstream & din); [/CODE] [CODE] //Game.cpp #include<iostream> #include …

Member Avatar for jonsca
0
137
Member Avatar for ztparker

Hi all, I am trying to produce a basic till system, and at current am using an ADOquery to bring up the items ordered along with their relevant prices in a DBGrid. What I now need to be able to do is use the price values contained within the DBGrid …

Member Avatar for PlotHost
0
134
Member Avatar for rhuffman8

I wasn't sure which section to post this under but I am working on an assignment in SQL and have created a batch file to make the tables, load the data into the tables, and then sends several queries to sql to get results. Is there a way I can …

Member Avatar for smantscheff
0
181
Member Avatar for rhuffman8

I wasn't sure which section to post this under but I am working on an assignment in SQL and have created a batch file to make the tables, load the data into the tables, and then sends several queries to sql to get results. Is there a way I can …

Member Avatar for rhuffman8
0
171
Member Avatar for oybek

Hi guys, I'm not good at programming so would you help me with this?! No fancy codes, just make it simple. Problem Statement For research purposes and to better help students, the admissions office of my college wants to compare how well female and male students perform in certain courses. …

Member Avatar for oybek
0
159
Member Avatar for newwbee

my assignment is to figure out the output but im bot sure i got it right here is the Q A variable x globally defined in your program is assigned the integer value 3. A variable x defined in a function named f_name is assigned the integer value 5. Answer …

Member Avatar for jonsca
0
189
Member Avatar for Eman84

When I open an image, I get error message: "Some text layers might need to be updated before they can be used for Vector output", and there's a warning message beside the text layer. Of course, I was trying to solve this problem all of the past days. 1- I …

Member Avatar for Armadillo
0
734
Member Avatar for appsrox

Hello, I want to write to a file in a particular format. There should be 2 columns, the first column should allocate 5 spaces to store digits and the next column should allocate 30 spaces to store characters. Ex:- [code] 1 Dave 234 Einstein 100000 Bob . . . [/code] …

Member Avatar for richieking
0
947
Member Avatar for ktsangop

Can anyone please give me a guideline on how to code the following? I have an MFC application which should call on a timer basis a python script from command line and read the ouput of that command line. I thought of using CreateProcess, but i have no clue of …

Member Avatar for ktsangop
0
412
Member Avatar for insanely_sane

Hey guys. So I want to learn how to do a simple I/O to and from a file. I want the simplest way to do this. My teacher sent me her program but I don't think I get what she is doing and it's giving me an error. So I …

Member Avatar for Progr4mmer
0
212
Member Avatar for stompjrkz400

ok everyone, i taking my first semester of C++ and i have a little quesiton, the teacher wants up to output and input on the same line, but to send the input through i have to strike enter, which keys to the next line, heres my code, just cant get …

Member Avatar for Labdabeta
0
281
Member Avatar for Alice1990

what is wrong with the ifstream and ofstream? I had try again and again and the info shown run to infinity. :( I tried a lot of times ady, will be glad if anyone can help, thank you :) Sorry if its looks messy, still learning all the way. [CODE] …

Member Avatar for Ancient Dragon
0
180
Member Avatar for yoshitsugu

Can anyone fix my problem? I'm sure my getDate function algorithm was right, but it still wrong.. here is the code: [code=c] #include<stdio.h> #include<string.h> #include<stdlib.h> typedef struct{int day,month,year;}Date; typedef struct{ char name[31],gender; Date dob; }Student; void getString(FILE* x,char* y); Date getDate(FILE* x); char readChar(FILE *x); int main(){ Student pupil[100]; int …

Member Avatar for L7Sqr
0
184
Member Avatar for Walahh

Hello everyone, I would really appreciate if anyone could please help me out here. I am trying to read the user's input in one page and then trying to display it in another page (want to let my users upload a file from their machine and save them in my …

Member Avatar for Javvy
0
149
Member Avatar for hiddepolen

Hi everyone! I have a strange problem, I haven't been able to solve, even with quite some knowledge of videocards, and computers. I have an nVidia 250 GTS, purchased a year ago (all new, no second-hand). Everything worked very well, until about a month ago. Sometimes, when I power on …

Member Avatar for hiddepolen
0
747
Member Avatar for beejay321

so for my computing project we have just started to work with using input and output of text files, the tutorial my teacher gave said to include these libraries, which i did [CODE]#inclue <fstream> #include <iomanip>[/CODE] and explains how to use [CODE] ifstream fin; //fin is my file input variable …

Member Avatar for beejay321
0
324
Member Avatar for JDCyrus

Good evening. I'm having issues related to subprocesses. What I'm trying to do is launch another program that has a command-line mode (Gnucap, in case it matters) as a child process from my Java program, then communicate with it by reading from its standard output and writing to its command …

Member Avatar for JDCyrus
0
199
Member Avatar for wrathmakin

Hey guys, I'm new to these forums and new to C++ in general. I have been looking around the forums and I have found threads with similar issues to mine but unfortunately they don't cover my exact issue. Essentially I want to make a histogram in C++ that takes a …

Member Avatar for wrathmakin
0
4K

The End.