132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for mar666

Hello, i have a question, im in first year university and i have to add Long term benefits to my program, here is the function that i have to add Long term benefits are charged at $2 per every full $100 of gross weekly earnings to a max of $100 …

Software Development c
Member Avatar for mar666
0
63
Member Avatar for rajistephen

hai friendz, I am a Bioinformatics Masters degree student. I am doing my final semester project in the topic Molecular Docking on C++ in Linux platform. During the programming I felt a problem in calling/executing a progam in to my program. I have to call a program which accept a …

Software Development c++
Member Avatar for rajistephen
0
112
Member Avatar for rmerchan

I need to write a function that opens a DAT file and calculates the average number of characters per line. Heres what I have so far... [code] # include <stdio.h> int main (void) { FILE *fp; int i; int counter; char ch; fp =fopen("TEST.DAT", "r"); for (i = 1; i …

Software Development c
Member Avatar for Chainsaw
0
106
Member Avatar for Flawless

How can i declare an array with variable size? i dont want it to be dynamic array, it have to be static. I mean the following: [code] int size; cin>>size; float array[size]; [/code] the previous code when compiled gives me that a constant expression required for the array declaration, although …

Software Development c++
Member Avatar for Chainsaw
0
142
Member Avatar for hill0ster

I can't seem to get this code to displayEmployeeInfo if the user enters a negative number for ID. Also I can't seem to get a total of all wages to display. Any helpful hints would be greatly appreciated. Thank you! [code] #include <iostream> #include <iomanip> using namespace std; #include <string> …

Software Development c++ display
Member Avatar for Chainsaw
0
137
Member Avatar for tushark

Hi all, when does the memory gets allocated to the function i.e. at compile time or at run time. If its at compile time the how is it? Thanks Tushar

Software Development c++
Member Avatar for Chainsaw
0
126
Member Avatar for Alfy

[code] #include <stdio.h> int i,type; int buffer[100],line[50]; struct student { char name[20]; int age; int id; }; struct student students[3]; int main() { for(i=0;i<3;i++) { printf("please enter your name:\n"); fgets(students[i].name,sizeof(students[i].name),stdin); printf("please enter your age:\n"); fgets(buffer,sizeof(buffer),stdin); sscanf(buffer,"%d",&students[i].age); printf("please enter your id:\n"); fgets(buffer,sizeof(buffer),stdin); sscanf(buffer,"%d",&students[i].id); } while(1) { int *ptr=students; printf("Please enter the …

Software Development c++
Member Avatar for Narue
0
147
Member Avatar for vegaseat

I found this neat little GUI calculator program on the net. It uses a function called _gcvt(double val,int limit,string cBuf), which seems to be used to convert a double val to a string cBuf, with some formatting and limiting. I replaced it with sprintf(), but the output looks rather crude …

Software Development c++ gui
Member Avatar for vegaseat
0
301
Member Avatar for hopeolicious

[code] #include <iostream.h> #include <string.h> #include <stdlib.h> #include <iomanip.h> class hope { char st_title[25]; char st_website[35]; char st_star[25]; char st_maker[25]; char st_rating[5]; int i_minutes; int i_year; float f_cost; int i_age; char st_status[6]; char st_response[20]; char ch_option; void getdata(); void processdata(); void putdata(); public: void run(); }dvd; void main() { char …

Software Development c++ ios
Member Avatar for Narue
0
168
Member Avatar for mister-fett

[B]I need some help finding a windows tutorial for C, not C++.[/B] (I am trying to learn C, compile about fifty pages of reference notes on it, and THEN learn C++. That way I dont have to worry about mixing things up, I will have notes and can forget about …

Software Development c++ first-post
Member Avatar for mister-fett
0
138
Member Avatar for Behzad Oskooi

need help my program has a table and when progrm run , if for any reasen the power went off i missed last records that i post to table any body can tell me what can i do? :!:

Software Development c++ first-post
Member Avatar for Behzad Oskooi
0
187
Member Avatar for Nneedofhelp

I'm writing a program that reads a text file and puts it into an array of structs. There can only be one transaction per line in this format: custNumber firstName lastName numItemsPurchased amtSpent What I dont understand is how do you put the data in the file into an array …

Software Development c++
Member Avatar for Nneedofhelp
0
127
Member Avatar for shantuli

hi, i am new in java, pls anyone help me to find out the error of my code. 1)Q- Write a java program which implements a simple sequential search algorithm for finding the position of a number in an array. My code is : [code] public class linearsearch { public …

Software Development algorithm java
Member Avatar for Narue
0
149
Member Avatar for boshkash1986

Please i want the code of the function which could get the serial number of the Hard-disk of any computer Please Can anyone help ?

Software Development c
Member Avatar for vegaseat
0
116
Member Avatar for ze_viru$

hi guys, Below is my program and it is giving me turf time.I want it to read-in 1-for counting cars,2-for counting money and Esc-key for displaying totals.Pliz give me ideas.(i'm using Microsoft-visual c++) [code] #include <iostream> using namespace std; #include <conio.h> class tollBooth { private: unsigned int cars; double money; …

Software Development c++ display microsoft
Member Avatar for Narue
0
139
Member Avatar for jigvesh

I was just thinking if it is possible to determine ones own ip address with the help of C++???Can someone please clear this query of mine

Software Development c++
Member Avatar for alc6379
0
118
Member Avatar for tsverrir

Hi there. Im new to C++ programming, but I know my way around Delphi. I'm doing a project that must be made in Borland C++ Builder. My problem is right aligning items in TListBox and TComboBox. Any help would be appreciated. kv.TSverrir

Software Development c++ delphi
Member Avatar for vegaseat
0
234
Member Avatar for coppernicus

Ok Yes I admit it I'm a student with a homework problem but I'm using this forum as a last resort. I've already written the code and I can't find the error no matter how many times I look over it so I really just need a second set of …

Software Development c
Member Avatar for frrossk
0
192
Member Avatar for galmca

hi guys...... i have a problem in writing a program of "how to delete the duplicate elements in an array" for example....if i enter an array like: 10 20 30 40 30 then it should print: 10 20 30 40 so could plz help me out????? :cry: i have attempted …

Software Development c
Member Avatar for alc6379
0
352
Member Avatar for lost_c++_dude

I've been working on this for hours I know the errors are staring me in the face but I just can't see them. Any help would be greatly appreciated. //prb01-1.cpp //This program calculates the total surface area of a pool #include <iostream.h> #include<iomanip.h> //using namespace std: int main() { const …

Software Development c++ display
Member Avatar for frrossk
0
422
Member Avatar for coolmel55

Need a bit of help formatting my output. I'm not even sure that this can be done. The output from the following code looks like this: Here is your output! ******************** rval = 0.954316 tval = 9.03351 p = 0.999997 Two tailed value = 5.716140e-006 Ok is there anyway I …

Software Development c++ linked-list storage
0
148
Member Avatar for onsbomma

Where can i find more info about the inner implementation of new/delete?? There is a lot of info about the different kinds of malloc but i can't find anything about new/delete. IS this compiler specific or defined by the standard?? thx in advance

Software Development c++
Member Avatar for onsbomma
0
383
Member Avatar for bsunkel

HI I'm very new to java. I have multiple JTextfields(about 11) on my JFrame. They are arranged in 1 column down my Frame. I would like to know how to move from the first JTextfield to the JTextfield of my choice(eg.It must move from 1st JTextfiled to the 5th JTextfield …

Software Development java
Member Avatar for bsunkel
0
107
Member Avatar for sweety

[code] // PROGRAM TO FIND THE NEXT DATE OF A GIVEN DATE #include<iostream.h> #include<conio.h> class udate { int day, month, year; public: void read() { cin>>day>>month>>year; } void write() { cout<<day<<"/"<<month<<"/"<<year; } friend int valid(udate); void operator++(); }; int valid(update D) { int d = D.day; int m = D.month; …

Software Development c++
Member Avatar for Stack Overflow
0
195
Member Avatar for lost_c++_dude

I know I am missing a big part of this program but for some reason my mind is not working at all tonight. I need to: > Write a program that asks the user to enter the duration of a baseball game > by first asking for the number of …

Software Development c++ display
Member Avatar for jasweb2002
0
141
Member Avatar for ra2833

i am trying to have macromedia flash button send a double or a symbol like (+, =, &) to a java program. the java program will save the input on an arraylist. while the flash button sends doubles it simply puts them on the arraylist, but if a symbol comes …

Software Development flash java java-swing
Member Avatar for ra2833
0
126
Member Avatar for ra2833

Hi, i am new to java..... i was wondering if someone can hlep me with the code to substitute the use of showInputdialog. currently i am using the following code to recieve Strings, but i do not want to use the java dialog boxes. is it possible to do something …

Software Development java
Member Avatar for ra2833
0
102
Member Avatar for JoBe

Hi guys, Quick question, I was trying out to determine the second smallest number of 10 random entered numbers, this is what I got: [code] #include <stdafx.h> #include <iostream> #include <iomanip> using namespace std; int main(void) { int s=0,x=0,y=0; cout<< "Input ten random numbers with cin and determine the second …

Software Development c++
Member Avatar for JoBe
0
130
Member Avatar for ALT-F4

Hey, I've been programming for sometime now and one thing I've never had to do is any sort of "debugging". I was just wondering if someone could help explain to me the process and the purpose of it. Thanks! :lol:

Software Development java
Member Avatar for ALT-F4
0
124
Member Avatar for HConn

I am trying to write a program that computes the area of a right triangle. It has to use a function to compute the area. This is actually a part of a bigger program, but when I couldn't get it to work I isolated this section. I tried looking on …

Software Development c++ google ios
Member Avatar for HConn
0
189
Member Avatar for galmca

hi "this program is for adding 2 tables with 3 rows and 4 columns" .... so i have done like this...... #include<stdio.h> #include<conio.h> void main() { int a[3][4],b[3][4],c[3][4]; int i,j; clrscr(); printf("\nENTER AN ARRAY:"); printf("\n\nFIRST TABLE:"); for(i=0;i<3;i++) { for(j=0;j<4;j++) { scanf("%d",&a[i][j]); } } printf("\nENTER AN ARRAY:"); printf("\n\nSECOND TABLE:"); for(i=0;i<3;i++) { …

Software Development c
Member Avatar for galmca
0
133
Member Avatar for mattcplusplus

here is the code: [code] struct Vertex { Vertex(){} Vertex(float x, float y, float z) { _x = x; _y = y; _z = z; } float _x, _y, _z; static const DWORD FVF; }; const DWORD Vertex::FVF = D3DFVF_XYZ; [/code] firstly, does the word static in the struct Vertex …

Software Development c
Member Avatar for mattcplusplus
0
113
Member Avatar for tonja1196

I am attempting to write a function that determine the area of a triangle. I am not sure what I am doing wrong when trying to determine the area. The error message I am getting is "error-call of overloaded 'sqrt(int)is ambiguous. Can you help me determine what is wrong?? [code] …

Software Development c++
Member Avatar for tonja1196
0
101
Member Avatar for NAjAM AHMeD

i need code for sorting number using Declaring and manipulating Arrays. Passing arrays to the functions as parameters. The objective of this assignment is to provide an on hand experience of: o Declaring and manipulating Arrays. o Passing arrays to the functions as parameters. Problem Statement: For this assignment, you …

Software Development c++ display
Member Avatar for jigvesh
0
145
Member Avatar for souphmars

i have sorted data in an array and sent to a file...how do i put this sorted data in a stack.

Software Development c++
Member Avatar for souphmars
0
108
Member Avatar for femmegirl

I need to write a JAVA program that converts an uppercase letter to a lowercase letter ... the method declaration should be public static char upperCasetoLowerCase(char ch) ... I think I am missing something in my thought process. Can anyone help? Here is what I have tried... [code] public static …

Software Development java
Member Avatar for femmegirl
0
154
Member Avatar for phr0stbyt3

Im writing a program that when given a date in the form of mm/dd/yyyy will calculate how old the person is in years... right now im stuck at getting the data as i cant figure out how to separate the data when it's entered in mm/dd/yyyy format... any suggestions?

Software Development c
Member Avatar for phr0stbyt3
0
130
Member Avatar for phr0stbyt3

hi... im a bit new to this forum. i saw it on google and decided to join up... im working on a calender like program for my computer science 102 course. the parameters are as follows: Make a program that, when given the mm/dd/yyyy, can decide what DAY the user …

Software Development c++ first-post google
Member Avatar for Narue
0
119
Member Avatar for cltc72

i wrote a program to help input User ID's for a system admin can any one check the code to seewhat wrong with it thank you

Software Development java
Member Avatar for cltc72
0
144
Member Avatar for lost_c++_dude

I keep on getting one error when I compile this. I can't figure out what is wrong with it. Please help. [code] //Write a program that asks the user to enter two integers. //The program should divide the first integer by the second and then display the resulting quotient and …

Software Development c++ display
Member Avatar for vegaseat
0
120
Member Avatar for StanVanDamn

I have a list of 10 numbers in a array and want to sort them. Basically I am using a "quick sort" and want to swap 2 positions in a array. But Im stuck with the code for how to do this. My code is written below. If anyone has …

Software Development c++ display
Member Avatar for Narue
0
141
Member Avatar for Flawless

How can i write an array to file using C++?? i need to write the whole array at once, meaing that the writing function should take a pointer to the array. And the array is holding floating numbers.. What's that fuction name that will satisfy that? How can i do …

Software Development c++
Member Avatar for DKnight764
0
5K
Member Avatar for N3wbi3C0d3r

Alright, i just learned the loops (if then else, for, do while, ect.) and just before it i learned the input and output (cin, cout). Now the tutorial i am using, has no homework built in it, so if anyone would be so kind to tell me something, ill probally …

Software Development c++
Member Avatar for N3wbi3C0d3r
0
314
Member Avatar for see_moonlight

i just want to find out '?','/','', ect, from a char array, can anyone help me to find out what's wrong with the code below? thanks the reture value is not always what i want? static int is_valid_function_name(char *function_name_string) { for( ; *function_name_string !=' \0 ' ; function_name_string++ ) { …

Software Development c++
Member Avatar for see_moonlight
0
156
Member Avatar for SureStoreX

I am doing a program in which there are 8 planes seats the user gets to choose whgich seat they want. I created the GUI buttons and what not (fairly easy), but I wanted to make an array....I'm rambling here, because I can't do this program the way I want. …

Software Development gui java perl
Member Avatar for SureStoreX
0
114
Member Avatar for mattcplusplus

below is what im talking about: int d3d::EnterMsgLoop( bool (*ptr_display)(float timeDelta) ); i don't understand the bool (*ptr_display)(float timeDelta) bit i think its a function pointer parameter type, so that it must point to a function that returns a value of type bool, and it must contain a single parameter …

Software Development c
Member Avatar for mattcplusplus
0
92
Member Avatar for PeterX

Hi! I have a little problem The program is OK, but I can not print out: QUESTION is how can I print out (class Test). I mean How can I write toString()methode.how can I print out "myTable" and the out put must be like this: Audi blue 180 Volvo red …

Software Development java
Member Avatar for PeterX
0
102
Member Avatar for cuperman

i've referred a couple of datastructure books and both give different definitions for width of a binary tree. one says its the no of nodes at a level,while another says its the longest path that can be traversed in a binary tree. can any one help me with a recursive …

Software Development algorithm c
Member Avatar for Chainsaw
0
102
Member Avatar for tionik06

:rolleyes: This is a program where the user enters how much they owe, then they enter how much they are gonna pay, like (30 dollars for a $25.63 amount), and their change is calculated back to them in ten dollar bills, five dollar bills, one dollar bills, quarters, dimes, nickels, …

Software Development c
Member Avatar for vegaseat
0
149
Member Avatar for zenah

: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 …

Software Development c++
Member Avatar for alc6379
0
104

The End.