132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for raj157

for regular series caluclation we could use this [CODE]{ double summand = 1; int n = 1; double sum = 1; do { summand = summand * x / n; sum = sum + summand; n--; } while (summand > 0.00001); return sum; }[/CODE] i.e for e^x= 1+x+(x^2)/2! + (x^3)/3! …

Software Development c++
Member Avatar for need.help
0
360
Member Avatar for Monyet

I want to make a program with C# that can locate a store that we want dependent on the (X, Y). So for example: if I put (1,2) it will say that this is the nearest store. Do you guys have any idea on how to do this? I'm fresh …

Software Development c#
Member Avatar for iamthwee
0
180
Member Avatar for raj157

in a simulation program like below Program the following simulation: Darts are thrown at random points onto a square with corners (1, 1) and (−1, −1). If the dart lands inside the unit circle (that is, the circle with center (0, 0) and radius 1), it is a hit. Otherwise …

Software Development c++
Member Avatar for ~s.o.s~
0
133
Member Avatar for addicted

i just started working on structures and i am having this problem: i created a structure "point" thus : [code] struct point { double x,y; }; [/code] i created another structure "rectangle" that contains a point as the origin like this: [code] struct rectangle { point origin; double width, height; …

Software Development c++
Member Avatar for addicted
0
108
Member Avatar for IwalkAlone

Q.Write a function to accept upto 25 numbers and display highest and lowest number along with all the numbers. Solution I tried [code=c] #include<stdio.h> #include<conio.h> void main() { int array[25],low,high; int i; clrscr(); do { printf("Enter a number(0 to terminate)\n"); scanf("%d",&array[i]); }while(array[i]!=0); i=0; low=high=array[0]; while(array[i]!=0) { if (low>array[i]) low=array[i]; else …

Software Development c
Member Avatar for IwalkAlone
0
201
Member Avatar for hlnren

HI everyone, i need to enter all those values and add them up. but have some trouble storing numbers to a array list. plz help~~! [import java.util.*; public class array { public static void main (String []args) { Scanner sc= new Scanner (System.in); int value; System.out.print("How many values are in …

Software Development java
Member Avatar for keya_datta
0
113
Member Avatar for jan1024188

What do you think is better for making applications? I like QT API verry much, but I dont know how compatible is with a system . I dont like VC++ because I can only use it on windows. Please help me to decide.. What do you think?

Software Development api c++ qt windows-api
Member Avatar for ~s.o.s~
0
249
Member Avatar for metkillerjoe

I have been trying to get a simple linear equation to draw. I can draw the axis fine but the equation will not draw. I think one would need a save/refresh function(s), but I don't know how to go about doing this: [code] pw = pictureBox1.Size.Width; ph = pictureBox1.Size.Height; w …

Software Development
Member Avatar for metkillerjoe
0
1K
Member Avatar for shishir

hello everyone.i have just started programming in EJB.i am tring to make an application for online banking system.During the compilation, i am getting the error of missing return statement in all functions where retrun type is String.i am trying to get the output in a JSP page....here is one of …

Software Development java session
Member Avatar for peter_budo
0
148
Member Avatar for flageolet

I want to create several files at once containing the same data. Is this possible? I tried using a variable in the file pointer and file name: [CODE] int tel; for (tel = 0; tel < 200; tel++) { FILE *bestand_patienten[tel] = fopen("patienten/patientent[tel].txt", "w"); fprintf (bestand_patienten[tel], "hallo"); } [/CODE] Didn't …

Software Development c
Member Avatar for flageolet
0
68
Member Avatar for rdsii64

I have just completed a mortgage calculator for my intro to C++ programming class. The code compiles and meets all the instructors requirements. My future assignments will build on top of previous ones. So what I am asking for are opinions on how to write better code. My goal is …

Software Development c++
Member Avatar for WaltP
0
114
Member Avatar for peter_budo

Does any of you can recomend some usefull resorces on native compilers?

Software Development java
Member Avatar for peter_budo
0
210
Member Avatar for nottoshabi

I need to fallow these directions for homework but I'm stuck on some things: [code] // open output filestream for appending // get valid file name ofstream fout( getOutFileName().c_str() ); // if the file opened successfully if ( fout.good() ) { cout << " The file was succesfully opened." <<endl; …

Software Development c++ file-stream
Member Avatar for John A
0
190
Member Avatar for n.aggel

hi, i want to develop a console interface for a program that i made{a university project}...... so i was wondering if anyone {with expertise in this matter} can supply me with links or examples..... For example , i am searching for ascii art...and also for ways to create menus with …

Software Development c
Member Avatar for nottoshabi
0
113
Member Avatar for nnobakht

Hey guys, i jsut got this assignment and i have 1 week to implement it but i have no idea where to start. The link to the question is [URL="http://www.cs.sfu.ca/%7Emitchell/cmpt-126/a2/a2.pdf"]http://www.cs.sfu.ca/~mitchell/cmpt-126/a2/a2.pdf[/URL] and i have also attached it as a pdf. the Stack class refered to in the assignment is [code] class …

Software Development java linked-list pdf
Member Avatar for jwenting
0
116
Member Avatar for gackiem

hi everybody, I've got some troubles in C and i need your help In C: (test.c) Suppose i include <unistd.h> and i call function "open" ==>> it run OK In C++: (test.cpp) I'm using a framework (e.g. RTM) which is function "open" has already in it. My problem is: althought …

Software Development c++
Member Avatar for gackiem
0
95
Member Avatar for Jishnu

Hello eveyone, I am working on a program that uses the graphics.h library functions and the 0x33 mouse interrupt. When I click at a particular place on the screen, the graphics nearby the mouse are saved and displayed on the new screen (that appears due to the mouse click) when …

Software Development c
Member Avatar for ~s.o.s~
0
153
Member Avatar for nottoshabi

What would be the pusedo code for a program that would write data to file? Would it look something like this? Declarations of type of data you want to enter. Open the file, you want to write to. Check if the file opened. If file did not open try again. …

Software Development c++ file-system
Member Avatar for WaltP
0
131
Member Avatar for san_fran_crisko

Hi, I am trying to store details in a Vector and then recall them using different search categories. I'm getting no errors but the details I enter are either not being stored or not being recalled. I don't know what one it is. I attached the code rather than copy …

Software Development java
Member Avatar for san_fran_crisko
0
110
Member Avatar for san_fran_crisko

Hi, I cannot for the life of me figure out why I keep getting the error message, "cannot find symbol method methodname()" when I try to call methods from another method. I have tried changing the main method so its not static but it makes no difference. Anyone who could …

Software Development api java
Member Avatar for san_fran_crisko
0
147
Member Avatar for RisTar

Hi , im trying to create a program that could delete number from an array and resize the array to the correct size . Array[0] = 32 Array[1] = 30 Array[2] = 40 Array[3] = 31 Array[4] = 61 Deleting the number 40 New array Array[0] = 32 Array[1] = …

Software Development c
Member Avatar for RisTar
0
113
Member Avatar for missedthepit

I am designing a 2 player car racing game, and I need to be able to control both cars at the same time from the keyboard (using the arrow keys for one and a,s,d,w for the other) I can get them to work when the other one is not being …

Software Development first-post python
Member Avatar for missedthepit
0
1K
Member Avatar for Bahama.Mama

:-| I am desperate... Can someone help me to debug this program.. It is a dynamic allocation file ..... > Write a program that will open a sorted text file, compute how many lines are in the text file, and then create an index that will tell at which byte …

Software Development c++ ios
Member Avatar for Ancient Dragon
0
145
Member Avatar for gamodg

input: source:1.1.2.3:?: destination:1.2.3.4 data:shfg hshsg h am trying to extract `1.1.2.3` from `source:1.1.2.3` please suggest :!: while(!mod.eof()) { mod.getline(buf,100); if(strstr(buf,"Source")) { w=strchr(buf,':'); strcpy(str,*w); } }

Software Development c
Member Avatar for Ancient Dragon
0
109
Member Avatar for JadedTortoise

OK I am wondering Can you make a variable hold an operator. Such as say +, -, / etc... And if so can that variable be used to replace an operator in an equation? for instance char a = "+"; int b = (2 a 3); thoguh that doesn't work …

Software Development c++
Member Avatar for Ancient Dragon
0
117
Member Avatar for radhikaDS

hi can anyone please write me a shell script that checks whethera filesystem is full or not hoping to get replies. thanks in advance...

Software Development shell-scripting
Member Avatar for thekashyap
0
75
Member Avatar for notfornothing21

Hi -- I am writing a program taht is supposed to input 12 integers into a program, sort them as they are entered, and then Print out the Sorted list. Second step is compute the average. I have done all that. THIRD is to delete all the integers that are …

Software Development c++ linked-list
Member Avatar for WaltP
0
143
Member Avatar for Earendil

It's my fourth day with <Accelerated C++> and I have to admit that this is WAY over my head. I picked this book because of the sticky "C++ Books" but really... this was NOT meant for beginners. (or is it just me?) Okay, enough of the whining. By taking joeprogrammer's …

Software Development c++
Member Avatar for Ancient Dragon
0
228
Member Avatar for vicky_dev

Check this code: [code=c] float velocity, acc, time; . . velocity = velocity - acc * time if( velocity == 0.0 ) { // Do something } else { // Do something else } [/code] This code isn't always workng. When the velocity is supposed to be exact 0, it …

Software Development c
Member Avatar for vicky_dev
0
84
Member Avatar for bobcats

Hi guys I am really having a hard time with C programming. Our lectures are very fast and not beneficial to those with non-C backgrounds. We were required to write a code for counting frequency of words from stdin and then listing them in descending order with those with equal …

Software Development c
Member Avatar for bobcats
0
353
Member Avatar for olams

Hi everyone. I am new to C++ and struggling badly. This is the first course i have ever struggled with in my life. I have problems with setting up programs and seeing the logic. Does anyone have any tips for understanding C++, and is there any good textbook or website …

Software Development c++
Member Avatar for olams
0
118
Member Avatar for noora000

Hello, Can you please help me I want to know the functions used to save a data in access database, I have the code to save in a file but is it possible to save in a database in C language. Reegards, Noora

Software Development c
Member Avatar for John A
0
112
Member Avatar for a1eio

Hi, I want to create a little Frame class that has two labels built in, the code snippet below is the class. [CODE=python] class DescriptionFrame(Frame): def __init__(self, master, title="", text=""): Frame.__init__(master) self.title = title self.text = text self.titleLabel = Label(self, text=self.title, font=("Times", 12, "underline"), fg="darkred") self.titleLabel.grid(row=0, column=0, sticky=W) self.mainLabel = …

Software Development python tkinter
Member Avatar for a1eio
0
940
Member Avatar for Tauren

Uhh well, I was just wondering if C++ and visual C++ are any diffrent

Software Development c c# c++
Member Avatar for John A
0
126
Member Avatar for jan1024188
Member Avatar for jan1024188
0
101
Member Avatar for mrjoli021

I have to write a program sort of like a hangman game. It will ask the user for a word and them prompts the user for a letter. I will tell the user how many time the letter is in the word and continue to ask for another letter. any …

Software Development c
Member Avatar for mrjoli021
0
77
Member Avatar for Aia

I am going through the exercises of this old C programming book, that doesn't have the answer in the back. Which is good. However I am not understanding a particular question. It says: Write a program that estimates the value of the mathematical constant e by using the formula: e …

Software Development c++
Member Avatar for ~s.o.s~
0
187
Member Avatar for Suplexx

Can someone please explain to me how to animate a sprite, using an image with a set of poses? For example is it possible to specify one part of an image, or do i have to use seperate image files for each pose? And lastly, how exactly would one go …

Software Development python
Member Avatar for jrcagle
0
236
Member Avatar for levk

Hi, I have an abstract class like this: [code]class Descriptor { public: virtual ULONG dispatch(char*, size_t, Stream) = 0; };[/code] and I have a subclass like this: [code]class ConsoleShell : public Descriptor { public: ULONG dispatch(char*, size_t, Stream*); }; #include "services/console/Console.cpp"[/code] and in Console.cpp: [code]ULONG ConsoleShell::dispatch(char *cmd, size_t len, Stream …

Software Development c
Member Avatar for ~s.o.s~
0
230
Member Avatar for Bobbiegirl

I have a project that is due and I have written the code and for a part of the code output to the file I cannot get the right format. I cannot figure out what the formatting should be can someone please help me. [code]#include <stdio.h> #include <stdlib.h> #include <string.h> …

Software Development c file-stream file-system
Member Avatar for Aia
0
167
Member Avatar for gerik

Does anyone know of a website that provides a lot of good problem solving exercises, or perhaps a great book for this? I've been reading a couple books on C++ but all of the exercises the books provide are sort of mediocre and don't really train me to actually use …

Software Development c++
Member Avatar for Ancient Dragon
0
137
Member Avatar for JadedTortoise

Ok I just started programming again after about 10 years, and i was doing the suggested beginner problems. The first one to create a program that returns the factorial of a number. I think i got it all down right but compiler is saying "expected primary-expression before else" here's the …

Software Development c++
Member Avatar for WaltP
0
117
Member Avatar for MojoS

Hi... I am trying to make a program that ask for a specific DNA number, where the program have to check if the given number is in a specific given list... here the program should tell me if they are or arent in the list..the program runs untill I write …

Software Development perl
Member Avatar for MojoS
0
117
Member Avatar for disc

Goodmorning, Can anyone tell me how to convert a TCHAR to a std::string ?? Thanks....

Software Development c
Member Avatar for disc
0
195
Member Avatar for aot

Here's something that I've wished for a number of times so far: the ability to create a function (taking X) that creates X variables, even if they are all initialized to the same value. For example, [inlinecode]f(3)[/inlinecode] would assign [inlinecode]var1 = 0[/inlinecode], [inlinecode]var2 = 0[/inlinecode], and [inlinecode]var3 = 0[/inlinecode]. My …

Software Development python
Member Avatar for aot
0
135
Member Avatar for mahajanrahuld

plz help me how run the perl script on tomact server plz tell me the step by step process its urgent

Software Development perl
Member Avatar for katharnakh
0
100
Member Avatar for Masood Ali

Hi All. I m a C++ programmer and I m trying to understand a piece of code. It fetches the values through command line arguments and makes a decision on the basis of these values. This code is working well but I dont know how? [code] for (int i = …

Software Development c++
Member Avatar for Masood Ali
0
141
Member Avatar for delphi_uk

Hello to you all, I am having problems with some code that I am working on for a text parsing system from an external *.txt file. The problem seems to stem from the Tokenize function, as I get a: "LNK2019 error: unresolved external symbol "void __cdecl Tokenize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> …

Software Development algorithm c++ delphi
Member Avatar for delphi_uk
0
107
Member Avatar for pupsia

Hello!! I realy need some help!! :sad: :cry: With Fibonacci numbers :( I found some programes, and they are a lot of help :cheesy: but... I need some more help :rolleyes: [code] #include <iostream> #include <conio.h> using namespace std; int main () { int a[128]; int fN; int i; a[0]=1; …

Software Development c
Member Avatar for John A
0
386
Member Avatar for niceliang84

[code=cplusplus] input.open("a.dat"); if (input.fail()) { cout<<"Unable to open a file \n"; exit(1); }//end if while(input>>alp>>index) {//write to Usecase usecase Alpha[a].setkeyword(keyword); Alpha[a].setindex2(index); a++; }//end while input.close(); cout<<"Please Insert The keyword:"; int position,py; char keyPrompt[100]; int i=0; char c; cin>>keyPrompt; for(py=0; py<a; py++) { if(strcmp(keyPrompt[0],Alpha[py].getalphabet())==0) { position=py; break; } //end if if(py==(a-1)) …

Software Development c++
Member Avatar for WaltP
0
152

The End.