132,729 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for mforeman

Hi all, I am trying to list out a bus as individual names. For instance - When I come across a section in a file that lists a bus like this: <busname>[0:2] I would like to print out this: <busname>[0] <busname>[1] <busname>[2] Here is what I have - It goes …

Software Development perl
Member Avatar for Rashakil Fol
0
156
Member Avatar for TimC

Dear all, I have a prog working and printing to screen. But as my program has grown i.e class/method definitions I need to tidy up my main(); my problem is with printing my results to the screen. [COLOR=Red]///this will print out to screen perfectly. note i left out the class/method …

Software Development c++
Member Avatar for WolfPack
0
164
Member Avatar for nabil1983

Does anyone know the code to show the critical count for a quick sort algorithm. Basically my cd database is almost finished. What i need to do is show a critical count for the quicksort quicksort for my database [CODE]void q_sort (struct CdRecords array [], int count) { quick_sort(array,0,count-1); } …

Software Development algorithm c
Member Avatar for nabil1983
0
280
Member Avatar for ilikerps

Hello, I just have a question about how to find a substring when one has only a string and coordinates for where the data will be? For instance, a string "why,hello", and data that is at the coordinates 4 to 8. strstr, I obviously cannot use directly, because I have …

Software Development c++
Member Avatar for Ancient Dragon
0
135
Member Avatar for ban26ana

I'll type the assignment I've been given. Then I'll tell you what my problem is, then I'll post my code. I'm sure the answer is probably so freaking stupid and would bite me if it had teeth. :mrgreen: A small airline has just purchased a computer for its new automated …

Software Development c++ display first-post
Member Avatar for ban26ana
0
275
Member Avatar for jto

i have different sige of photo files which was scanned through a scaner and save as *.jpg file , now i want to use all this files in a form made in vb6 where i want to link all these files trough data base so that i can see each …

Software Development visual-basic
Member Avatar for Kegtapper
0
300
Member Avatar for heavyc

I have a problem i have a fully operational C++ code that works but when i convert it to ASM (assembly) code it doesnt work I dont know where I am going wrong but here are both codes.. [code] #include <iostream> using namespace std; int main() { int n, tmpA, …

Software Development assembly c c# c++
Member Avatar for heavyc
0
196
Member Avatar for ilikerps

Hello, I am having trouble with arrays. Basically, this is what happens: [code] vector <char*> constArray(10); char* changingString = "hello"; constArray[0] = changingString; changingString = "hi"; printf("constArray[0] = %s\nchangingString = %s", constArray[0], changingString); [/code] Output: constArray[0] = hi changingString = hi So, I think constArray[0] is changing because it points …

Software Development c
Member Avatar for ilikerps
0
122
Member Avatar for TimC

Ref Polymorphism: I am trying to get the method `calculate_pay()` to work. As each type of doctor will have a differnt payrate I am trying to call the calculate_pay() but i am having difficulty. Should it be int doctor::calculate_pay() { return (doctor::get_Payrate()*hours); } will this line return each type of …

Software Development c++
Member Avatar for TimC
0
172
Member Avatar for nabil1983

im trying to do a sort for the array structure records that i have entered... so far i've tried to use a book to do the coding...but im lost.. can anyone tell me if im on the right track or where im going wrong!!! [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> …

Software Development c data-structure
Member Avatar for perniciosus
0
188
Member Avatar for satimis

Hi folks, I'm prepared to write a simple perl scripts as follow There are 25 commands executed in following sequence[code]export LFS=/mnt/lfs mount /dev/hda6 /mnt/lfs mkdir -p $LFS echo $LFS /mnt/lfs (output) /usr/sbin/chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h mknod -m 600 /dev/console c 5 1 …

Software Development perl
Member Avatar for mforeman
0
189
Member Avatar for nabil1983

Hello I've rearranged my program so i can enter more than one word for a field and it works,, new problem is after just entering data once,, i get stuck in the menu with a loop. tried all kinds of stuff to get out but cant. what i want to …

Software Development c data-structure
Member Avatar for HyperEngineer
0
145
Member Avatar for sahil_logic

plz give me links or discuss on address calculation in 2d arrays. i have little knowledge of calculating the address. can any one give some formula or something coz my professor gave it but i wasnt able to follow . i remember he was using terms like rowmajor, column major, …

Software Development c++
Member Avatar for Ancient Dragon
0
170
Member Avatar for j1979c

[COLOR=Navy][B]Just want to know the latest visual studio available right now. I'm currently using visual studio version 6.0. What I can see from MS website is version 2005 right now. Does that include the .NET thing? Cause I'm kinda curious what this .NET thing is all about..and recently there are …

Software Development c++ oracle sql vb.net visual-studio
Member Avatar for Ancient Dragon
0
126
Member Avatar for nabil1983

'ello whenever i compile i keep getting an error saying identifier or declarator expected....for some reason i cant correct it neone know whats wrong??? [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> void filewrite(void); void fileprint(struct tuple *myDB); // Idea here is to enter an array of structures // write them to …

Software Development c data-structure
Member Avatar for Ancient Dragon
0
235
Member Avatar for Rearden

I'm trying to create a custom dialog that acts much like th JOptionPane.showInputDialog() except it uses an asterisk as an echo character. So far, I've come up with the following. . . [code] class CustomInputDialog extends JDialog implements ActionListener { JLabel prompt; JPasswordField input; JButton ok; JDialog dialog; String word; …

Software Development java
Member Avatar for Phaelax
0
277
Member Avatar for SNA

Hello, If I want to check my algorithm if it works good in every cases so can i check very outer cases and then I can conclude that my algorithm works well in all cases?

Software Development algorithm c
Member Avatar for perniciosus
0
185
Member Avatar for Platanum

Any help would be appreciated, this project is fustrating me. Has to do with PGM image files, but really the problem in my code (I would assume, lies within my pointers and dynamically allocating memory). Any help would be appreciated. Code: (main.cpp) [CODE]#include <cstdlib> #include <iostream> #include <string> using namespace …

Software Development c++ image ios
Member Avatar for Ancient Dragon
0
166
Member Avatar for TimC

dear all, when I try and compile the following code I am recieved a linker error. Can some one steer me in the right direction. Also are my use of the virtual statments correct? many thanks tim #include <iostream> #include <stdlib.h> #include <string.h> using namespace std; class doctor{ protected: string …

Software Development c++
Member Avatar for WolfPack
0
102
Member Avatar for coolgal

hi... i really need help writing this program please i cant do it............ the instructions are.... a mail order house sells five diffrent products whose retail prices are shown in the followingtable: product# retail price: 178 $2.98 185 $4.59 199 $9.98 208 $4.19 288 $6.87 there are several permanent customers …

Software Development c c# c++
Member Avatar for coolgal
0
224
Member Avatar for Halcyon

Hello folks, First timer here so bear with me. I'm trying to tokenize an array of strings. This program reads an array of strings, each string has a First and Last Name and some have Middle Names. The array of strings is then bubble sorted(not the most efficient but required) …

Software Development c++
Member Avatar for Halcyon
0
158
Member Avatar for sheldonhigh16

i am doing a project on computer programing and i need someone to be working in that field to answer some of my questions......... Here are the questions: 1. What degree do you need to be able to work in Computer Programing? 2. Is this job hard? 3. Is this …

Software Development c
Member Avatar for dwks
0
77
Member Avatar for SpS

We can call static member function through both class name and objects...but we generally use class name to call static member function instead of objects.... Is there any performance benefit in it by using class name or is it just to remove confusion by not calling through object

Software Development c
Member Avatar for SpS
0
119
Member Avatar for Acidburn

Hey guys and gals. I'm struggling yet again to get my file input working. I have a text file containing: John 19 smith 15 03 1986 Billy 15 Nomate 19 07 1990 ... etc I'm needing to get a line in at a time but also store the variables in …

Software Development c++ file-system
Member Avatar for Acidburn
0
143
Member Avatar for prasath

Hi guys, Will you guys please suggest me some good books for TEXT compression with programming examples given in c or c++. Hope you guys will help me. :) prasath.

Software Development c++
Member Avatar for perniciosus
0
147
Member Avatar for fili00

hey everybody, I just wanted to know how I can print out with awk or others only one line and not a whole column what is made by print$1. I have a data which contains 205 lines and I want for example only the 6th line. I tried with this …

Software Development shell-scripting
Member Avatar for fili00
0
196
Member Avatar for btech

The code below compiles but produces the wrong output. The code is supposed to convert an infix string to postfix. the current output is only the arithmetic operator, unless there are parenthesis then it will only show the right parenthesis. I have been woking on this for hours and am …

Software Development c++
Member Avatar for perniciosus
0
131
Member Avatar for ban26ana

I don't really understand arrays. I'm getting myself quite confused here. I have to answer a bunch of questions regarding a 2x3 integer array t. Here are the questions that I'm still having a problem with: 1. Write a nested for structure that initializes each element of t to zero. …

Software Development c
Member Avatar for SpS
0
115
Member Avatar for ilikerps

How does one reset an array, to make it retain its size but get rid of all data it has stored? Would one do it by setting all the array values to '\0'?

Software Development c
Member Avatar for SpS
0
503
Member Avatar for nabil1983

Ok i've tried understanding some previous posts but im just finding it really hard to work with structure passing to other functions and sorting. Can someone please explain in a simplistic on how i can pass structure to a function that sorts the structure by 'Year' or 'Artist' Below is …

Software Development c data-structure
Member Avatar for Ancient Dragon
0
143
Member Avatar for StealthCobra

I am getting these error can someone help? subscript requires array or pointer type -- point to lowest[x] = lowest; subscript requires array or pointer type -- average[x] = average; [code] #include <iostream> #include <iomanip> #include <string> using namespace std; void studentName(string name[4]); void getScores(double grades[4][5]); void findLowest(double grades[4][5], double …

Software Development c c# c++ display
Member Avatar for StealthCobra
0
118
Member Avatar for augie0216

Someone told me there were only 4 toolbars in vb.net. I thought there were than that. Can anyone shed some light on this?

Software Development vb.net
Member Avatar for augie0216
0
88
Member Avatar for j1979c

[B][COLOR=Navy]This is an ongoing question going through my head.... I've been doing C++ programming for about 4 months now. Been using Deitel's C++ How to program book. Learned from the basics till data structures like link lists, queues, stacks, trees..all using templates, vectors, pointers. File processing (sequential and random). Well, …

Software Development api c++ gui windows-api
Member Avatar for jwenting
0
206
Member Avatar for some one

hi every 1 please i need your help to complete my code cause i could not complete it it is for a bank wich . Design it so it can be used by the bank’s staff. It should enable the following: o Opening a new account for a customer o …

Software Development c++ display
Member Avatar for some one
0
176
Member Avatar for btech

I cannot figure out these errors can someone please help [code]error C2065: 'stack' : undeclared identifier error C2228: left of '.isEmptyStack' must have class/struct/union type error C2228: left of '.pop' must have class/struct/union type error C2228: left of '.push' must have class/struct/union type error C2228: left of '.top' must have …

Software Development c++
Member Avatar for iamthwee
0
243
Member Avatar for akki_freak

hi folks, plz try sending answers to folllowing questions....i know they are a lot..still...send as many as possible..... Write a "Hello World" program in 'C' without using a semicolon. Write a C++ program without using any loop (if, for, while etc) to print numbers from 1 to 100 and 100 …

Software Development c++ linked-list
Member Avatar for Rashakil Fol
0
354
Member Avatar for loganb

Ok I'm working on a class project for C programming and I'm having problems opening 2 data files I need. When I execute the code it gives me the error opening files message. To execute I've been getting into the proper directory and then typing finalproject population path finalproject is …

Software Development c
Member Avatar for winbatch
0
74
Member Avatar for ultimate_fusion

I am trying 2 write a program to solve a soduko. I have lots of text fields and I need to compare them like if (string1.equals(textfield){ do whatever} but it only works for "0" e.g null??/ I have tried parsing it to an int but get the same result. any …

Software Development java
Member Avatar for ultimate_fusion
0
362
Member Avatar for nabil1983

Ok i decided to start from scratch for my CD database. I've created an array structure, i can enter the fields, but for some reason it dont display to screen neone know why please??? also how can i add an option to either add more records or just quit . …

Software Development c data-structure display
Member Avatar for perniciosus
0
114
Member Avatar for vicky_dev

Hi, this program is supposed to print the first word of a string ( the whole string could be a single word as well. But it gets stuck in an infinite loop :!: : [code] #include <stdio.h> #include <conio.h> int main() { char *str = "This is a sample string"; …

Software Development c
Member Avatar for ajit.nsit
0
188
Member Avatar for fidelljf

how could i display the reverse the values of the array that are random numbers using pointers. So far this is what I have. it displays the array but it does not display the reverse. [code] #include "stdafx.h" #include <iostream> #include <ctime> #include <cstdlib> const size = 10; typedef int* …

Software Development c++ display
Member Avatar for fidelljf
0
103
Member Avatar for ilikerps

Hello, I am having a problem with sockets. Not the sockets themselves, exactly, but more of the recieving and accepting of messages and connections (respectively) at the same time. My program runs a loop where it will wait to accept a connection (using accept()), and then wait to recieve a …

Software Development c++ client-server multithreading
Member Avatar for ilikerps
0
131
Member Avatar for iqbal

I am try to write a C++ program that tells the eldest and youngest sibling in a family. I am write this program declaring a class.I write all code program but my program does not compiles and give oprator error. Please someone check this and make it correct.I need this …

Software Development c++
Member Avatar for dwks
0
171
Member Avatar for Dabdob

Hi everyone.. Have you ever head of Ruby programming language? Waiting your comments and help

Software Development c ruby
Member Avatar for Rashakil Fol
0
100
Member Avatar for Operator

Hey everyone, I'm writing a program for a class. It's a relatively simple C program that I'm compiling in Dev C++. I'm trying to make it as complex as possible, but I'm just a college freshman and don't know much beyond the basics of programming. I'd like to enable option …

Software Development c++
Member Avatar for Dave Sinkula
0
160
Member Avatar for kdw3

Im trying to create a simple RLC program. Im n ot sure the best way about it, but im trying to to use to 20 character arrays. One to read in the characters to be compressed (buffer) and the other is used to as a check. Either way, the buffer[20] …

Software Development c++
Member Avatar for Ancient Dragon
0
298
Member Avatar for TimC

Now that my program is growing in size and I have quiet a few display functions is it possible to put all these display functions in another header file eg. display_functions.h My objective is to clean up my main() file so I dont have to scroll up and down all …

Software Development c++ display
Member Avatar for winbatch
0
265
Member Avatar for TimC

I have 2 functions in my main(). When I call the first function void patient_main_menu(); it will leave me input all the required fields and it also will print to screen EXACTLY what I had inputed originally. When the second function is called void doctor_main_menu(); it SKIPS/ Will not leave …

Software Development c++ display
Member Avatar for TimC
0
229
Member Avatar for nabil1983

Hello I done the program below for a CD database but im having a few problems with some of the functions can someone please help me out here ,, :: First this is when i enter a record i can enter the first set but when i try to enter …

Software Development c
Member Avatar for Dave Sinkula
0
152
Member Avatar for iqbal

I am try to write a C++ program that tells the eldest and youngest sibling in a family. i try to write write a member function that overloads the > Operator to sort the Siblings according to their ages after making comparisons.but i am fail. please someone write this. thanks …

Software Development c++
Member Avatar for Dave Sinkula
0
242

The End.