132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for willow

I have tried various break statements and I cannot get my program to break correctly. Original program is a nested loop asking user for input for either an ascending or descending triangle. That works. But when I try to add a break, it either runs after entering how I want …

Software Development c++
Member Avatar for vegaseat
0
124
Member Avatar for mahas

#include <fstream.h> class Person { char emp_name[40]; int Tel; public: void ShowData() {cout<<"Name: "<<emp_name<<endl<<"tel: "<<Tel;} }; void main() { Person s1; ifstream file("c:\\mydocuments\\db_add_tel.mdb"); file.read((char*)&s1,sizeof(s1)); s1.ShowData(); } can anyone telme whats really happening aftet opening the add_tel file. actually i don't know how to makethe screen stay because when i run …

Software Development c++
Member Avatar for Narue
0
213
Member Avatar for dcving

I fixed the whole program. :twisted: . I compiled it after each step to make sure there were no errors, if so I corrected them. :mrgreen: . I do, however, have 2 questions. :?: . How do I get the highlighted lines [COLOR=Red]below[/COLOR] to center above the [COLOR=Red]****************[/COLOR] :?: And …

Software Development c++ display
Member Avatar for N3wbi3C0d3r
0
197
Member Avatar for Nabeelahmad

When ever i am entering any code it always succeed but i cannot see out put on screen it just flick for few seconds and then come back to complier. for example small prog i am writing #include <iostream.h> main() { cout<<"my name "; return 0: } it should give …

Software Development c++
Member Avatar for Nabeelahmad
0
118
Member Avatar for NicolaD

:sad: Hi all, been trying to code the following program for ages, if anyone can help please do so. Code a java program that will determine the cyclomatic complexity(CC) of any given java source code module held in a text file. The program is to display the CC. Note- CC=Number …

Software Development display java
Member Avatar for Narue
0
148
Member Avatar for Banu

Hi I am writing a toy encryption method objecy oriented program in which user enters a statement, and each character in the statement is replaced by another character which are stored in a 2D array. I have created a static array in which each alphabet has a value in 2D …

Software Development c++ encryption
Member Avatar for ZuK
0
943
Member Avatar for SexConker

Alright, I got this assembler class, and we're doing mips, and such. Anyway, I got this problem, see. I have to read in a number in binary (sign magnitude), convert it to decimal, then convert that to a string of ascii characters, and then print them out, with a - …

Software Development assembly
Member Avatar for SexConker
0
243
Member Avatar for hill0ster

Hello, I am getting strange values in my display for the salary, hourly or commission. I do have to use arrays and wondering if there is a simple fix. Maybe I need a pointer to the array? If anyone has a suggestion, please let me know. Thank you. #include <iostream> …

Software Development c++ display
Member Avatar for Chainsaw
0
94
Member Avatar for vrush

Hi I got one assignment to submit within 2 days.I am suppose to build scanner(lexicle analyser) in c,which will take input from standard input stream and print its class. for example if I input + it will displya "plus",- "minus" I have to run this program in unix environment. program …

Software Development c file-stream unix
Member Avatar for vrush
0
126
Member Avatar for Young Teck 06

Everybody, post your very first C++ code up here if you still have it, heres mines with help from the book I am reading and Narue for the help of keeping the window open, thanks pal. [CODE] // // Program to convert temperature from Celsius degree // units into Fahrenheit …

Software Development c c# c++ first-post
Member Avatar for Young Teck 06
0
125
Member Avatar for Tejas

Can someone out there help me with this prog. ?? I have been trying to get this for the past 2 weeks !! The question is: Write a program to input an array having n integers. Display the array. Input a number x. Perform the following functions: 1)Delete all the …

Software Development c display
Member Avatar for cuperman
0
92
Member Avatar for N3wbi3C0d3r

I have my Project setup like this. +TW TW1 TW2 Before i created the file TW2 i compiled TW1, and TW1 worked fine. When i added TW2, and then compiled it, and started either TW1 or TW2 it said "Project is not compiled". Any idea on how im sposed to …

Software Development c++
Member Avatar for Narue
0
172
Member Avatar for kakilang

can someone explain to me what does below code do?? [PHP]keybd_event(VK_MENU,0x38,0,0); keybd_event(VK_RETURN,0x1c,0,0); keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0); keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0); [/PHP]

Software Development c
Member Avatar for Narue
0
352
Member Avatar for tyalangan

I have a long and confusing problem (to me) I'm new to C. I was wondering if anyone could help me with my problem. File: Prime.h #include <stdio.h> #include <stdlib.h> int is_prime(int n); File: is_prime.c #include "primes.h" int is_prime(int n) { int k, limit; if (n == 2) return 1; …

Software Development c
Member Avatar for Narue
0
125
Member Avatar for dcving

This is what I have so far, I haven't corrected the input prompt display, nor the output display of the time into `HH:MM:SS`. Please give me any suggestions on the program. thanks! :mrgreen: /* Program definition: The program will ask for and read an elapsed time in the following format: …

Software Development c++ display
Member Avatar for Narue
0
138
Member Avatar for prackit

I have to do a basic program of a calulator(text field at top for display and then all numbers) it does not have to be funtional. I know you can only have one layout manager per container...but I can't get it to work? This is what I have so far..any …

Software Development display java java-swing
Member Avatar for ALT-F4
0
155
Member Avatar for blargage

Hello everyone, im glad i have come across this forum, im sure its going to be a lot of help for me! I have been reading through the forum here to try and find some help with a problem i am currently experiencing. My problem is that i am trying …

Software Development c++
Member Avatar for blargage
0
130
Member Avatar for Calum

i'm using Dev C++, and when i write a program, it compiles it fine then when i execute it the program window closes after the program has finished. does anyone know how to keep the window open. im running on XP(SP2). i've tried right clicking on the .exe but theres …

Software Development c++
Member Avatar for Calum
0
129
Member Avatar for chungaroo

i'm write a program that asks for a password then if correct will go into a while loop, but for some reason whenever i execute the code and enter the right pass, nothing happens. heres what i've been working on: [CODE]/* This program will simulate a program that could be …

Software Development ide java
Member Avatar for jerbo
0
116
Member Avatar for N3wbi3C0d3r

Posted it in the wrong place, sorry;) Hello peoples, as you can tell by my name, ima newbie coder, and barely know the basic concept of a non object oriented scripting language comonly known as QBasic. I wanna learn advanced programming to make games, and random programs i may need …

Software Development c++ career visual-basic
Member Avatar for N3wbi3C0d3r
0
145
Member Avatar for bryan7890

i wrote in my prog #include <iostream> using namespace std; int main ( ) { int arraysize = 25; int a [arraysize] = { 2, 3, 5, 19, 4, 20, 35, 123, -3, 45, 82, 93, 62, 35, 29, 21, 19, 57, 35, 64, 62, 324, 242, 0, -3 } …

Software Development c++
Member Avatar for bryan7890
0
100
Member Avatar for SyLk

sup guys im trying to implement a nested for loop for a 2 dimension array that initializes the array to the character '*'. but its just printing out garbage, i think im messing up on my syntax :sad:.....some help would be appreciated here is what i got so for: char …

Software Development c++
Member Avatar for SyLk
0
149
Member Avatar for elianahendler

hi i have a C++ assiggment and have no clue how to do it! the instructions are : write a program that calculates the bill of a simple restaurant. on the menu there are only 3 things to order - orange juice, vegetable salad, pasta. it is possible to order …

Software Development c++
Member Avatar for alc6379
0
104
Member Avatar for hfick

I am supposed to figure out what the output produced would be from this equation..can anyone help me and explain it to me char var1='s'; char var2='x'; char *ptr1, *ptr2; ptr1=&var2; *ptr2=*ptr1; cout << *ptr1 << " " < var2 << endl;

Software Development c++
Member Avatar for Narue
0
164
Member Avatar for Simplicity

How can I have different food items in a snake game? This is a piece of the code I'm given: [PHP] void display_food_at(int8_t x, int8_t y) { set_display_attribute(31); display_character_at(x, y, '#'); } [/PHP] I believe I have to add something somewhere around it..???

Software Development c
Member Avatar for Narue
0
90
Member Avatar for Midnight Skulke

I have design two program and both have errors on it. the first is supposed to handle queue on integer, double, string and date. I have done for integer and double. When I compile it there was error on it. If you can just help me debug it and i …

Software Development algorithm c++ display queue
Member Avatar for Narue
0
232
Member Avatar for NAjAM AHMeD

hello! i am a brand new user to this site ihope that my experence with this site would be better than previous ones, i am studying BS(computer science), recently i had trouble with a program that ihave made well that thing is that its is complete and working as well …

Software Development c++
Member Avatar for Narue
0
120
Member Avatar for javaLearner

hi. more or less a stupid question, but anyway.. why have a 'finally' statement in java exception handling -why not just clean up in the 'catch' clause?? is it for when an exception cannot be caught?? if not, then 'finally' seems a little redundant to me.. cheers. :eek:

Software Development java
Member Avatar for javaLearner
0
137
Member Avatar for sunny124

hi, my next button displays next record from the database. But after i save a record, next button don't work. Im not sure but is the next button not working because the resultSet needs to be refreshed after saving a new record? I have created the statement and resultSet in …

Software Development display first-post java sql
Member Avatar for sunny124
0
112
Member Avatar for lvdude

Hi all, First off, I'm relatively new to the world of C/C++. I've taken some courses in University years ago and haven't used it much since. What brings me back is the following dilema I have: I've built an application using National Instruments LabVIEW ([url]www.ni.com[/url]). For those not familiar its …

Software Development c++
Member Avatar for lvdude
0
206
Member Avatar for m-soft

Hello I have a number from maximum 255 digits. I must compute the cube root of this number with 10 decimals. Time of execution is 1 second Could you help me ? 10x

Software Development c++
Member Avatar for vegaseat
0
141
Member Avatar for NitrousGT

I think I know how to initialize the program, but i am doing a self learner and i am not sure how to begin or what to initialize. If anyone has any ideas please help me out. Here is a problem if you dont have the book... C++ HOW TO …

Software Development c++ display
Member Avatar for alc6379
0
353
Member Avatar for Waskar

Hi to every one :cheesy: (I'll say it once: forgive my bad english :sad: ) I have a question!!! Is there any way to get information aboute Dial-tone PHISICALLY presense without performing a call dail?????!!!!! I've write a code, in vc++, to make connections over 16 Comm Ports (throw a …

Software Development c++
Member Avatar for Waskar
0
376
Member Avatar for bemrag

hello everyone I need help to correcting and executing the program I wrote the program but program gives some errors like; warning C4013: 'printf' undefined; assuming extern returning int warning C4013: 'scanf' undefined; assuming extern returning int : error C2046: illegal case : error C2046: illegal case fatal error C1004: …

Software Development c
Member Avatar for Narue
0
252
Member Avatar for shaahul

Hi I needed some help on automating the installation of a software. During the installation of a software, you get various options. For eg. 1. the license agreeement screen gives you two options with two radio buttons. Choosing one selects Yes, I agree with the terms and conditions. And choosing …

Software Development perl shell-scripting
Member Avatar for alc6379
0
146
Member Avatar for hill0ster

#include <iostream> #include <cstring> using namespace std; bool equalStrings (char[], char[]); //given here but must complete // on midterm int main() { char str1[80]; char str2[80]; cout << "Enter your first string: " << endl; cin.getline(str1); cout << "Enter your second string: " << endl; cin.getline(str2); if (equalStrings (str1, str2) …

Software Development c++
Member Avatar for Narue
0
138
Member Avatar for quasimof

We are supposed to write a program which asks for the month, date, and yr and then outputs the day of that date. **input:** Month: 7 // This is July Day: 4 Year: 1776 **output:** July 4, 1776 was on a Thursday Formula: day = (r + [2.6m - .2] …

Software Development c++
Member Avatar for ZuK
0
559
Member Avatar for SWET Student

hi everybody I have a project to write the code for the hangman game and i got stuck now :sad: :cry: The game should allow the user to choose if he/she wants to view the man as stick figure or a picture in the stick figure i should write the …

Software Development display microsoft microsoft-windows vb.net
Member Avatar for SWET Student
0
272
Member Avatar for nicoletonyf

Hello there, I have to overload the subscript operator to return the largest element of a collection, the second largest, the third largest, and so on. I don't really understand what to do. Do I have to create an array and sort it? What the output will looks like? I'm …

Software Development c
Member Avatar for jwstickley
0
267
Member Avatar for Tomas Lopez

I have to write this program that prompts the user for the size of the tiles in inches and the number of rooms to be input. It should then input the dimensionsfor each room, and output the tiles needed for that room. After the last room is input, the program …

Software Development c++
Member Avatar for jwstickley
0
158
Member Avatar for kwongchungying

hello, i have been stuggling with c++, i need to compile the following files but it never works always tell me the redefinition error i have tried both g++ and visual c++ but i can't make it work, i wish anybody can tell me why here are my codes please …

Software Development c++
Member Avatar for Ejaz
0
283
Member Avatar for Young Teck 06

Need a little help here. Seems as if whenever I run the program, it closes before showing the results. Here is the code below: [code] // // Program to convert temperature from Celsius degree // units into Fahrenheit degree units: // Fahrenheit = Celsius * (212 - 32)/100 + 12 …

Software Development c++
Member Avatar for Young Teck 06
0
117
Member Avatar for bryan7890

Write a complete program that creates an array of characters, 3 times the size of ASCII table and itinializes the contents of the array to correcponding ACSII values; when end of ACSII table is reached, you should loop back to the beggining and start again. Print the contents of the …

Software Development c++ legal
Member Avatar for bryan7890
0
131
Member Avatar for gwenny

I need help writing a program using a character Queue. I am using the Queue to determine if the two sequences of characters are the same as each other. Also I have to implement my character Queue as a linked list (using Nodes). Can anyone out there help me write …

Software Development c++ linked-list queue
Member Avatar for Narue
0
146
Member Avatar for sachin kumar

Hi All I' m a new member of Dani Web Community.my problem is with nested linked list implementation.when i insert second node in linked list, it always overwrites the first. my declarations are as follows: struct dataset { int key ; char value[30]; struct dataset *ptrdataset; }*ptrd; struct geometry { …

Software Development c dataset email linked-list
Member Avatar for ZuK
0
164
Member Avatar for Young Teck 06

A bit excited here people, just completed my first (well from the book) C++ script code. Its a Temperature Converting code from the C++ for Dummies book. Unfortunately, I haven't even made it through the first chapter and am having problems with the reading. So i need to ask a …

Software Development c++
Member Avatar for Young Teck 06
0
111
Member Avatar for pratima

i must write a program that reads a number between 1 and 100 then calls a function to check if the number is part of the Fibonacci series.the main should display if the number is part of thr Fibonacci series.thanks #include<iostream.h> #include<conio.h> int check_fib(int a) {char ans1,ans2,ans; int sum,x,i; sum=0; …

Software Development c++ display
Member Avatar for Narue
0
136
Member Avatar for KittyGirl

I have to write code that will prompt you to input a sentence, then it will output the number of vowels in the sentence. This is what I have so far. Can someone tell me what is wrong with it? Thanks so much! [code] //Input a sentence, then return number …

Software Development c++
Member Avatar for Narue
0
135
Member Avatar for pratima

:rolleyes: i have to write a program which ask the user the height of a pyramid between 1 and 15 and displays a pyramid of this height made up of "*" characters on screen.for example how high would you like the pyramid?:37 pick another height(must be between 1 and 15):6 …

Software Development c++
Member Avatar for Narue
0
123
Member Avatar for prachi

hello frds, i am provided with assignments for evaluation of stack (i.e conversion of prefis ,postfix, infix into each other) i tried for a long time and had to go for searching on net i need it urgently .plzzzzz if any1 knows it let me know prachi

Software Development c
Member Avatar for Narue
0
107

The End.