132,726 Archived Topics
Remove Filter ![]() | |
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++ | |
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# ![]() | |
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++ | |
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++ | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 | |
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++ | |
Does any of you can recomend some usefull resorces on native compilers? Software Development java | |
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 | |
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 | |
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 | |
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++ | |
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 | |
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 | |
![]() | 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 ![]() |
![]() | 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 … ![]() |
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 | |
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 | |
:-| 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 … | |
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 | |
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++ | |
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 | |
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 | |
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++ | |
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 | |
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 | |
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++ | |
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 | |
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 = … | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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++ | |
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++ | |
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 | |
Goodmorning, Can anyone tell me how to convert a TCHAR to a std::string ?? Thanks.... Software Development c | |
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 | |
plz help me how run the perl script on tomact server plz tell me the step by step process its urgent Software Development perl | |
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++ | |
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> … | |
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 | |
[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++ |
The End.