132,726 Archived Topics
Remove Filter ![]() | |
Hey all, I was just wondering, is it safe to do something like this? [code] char *msg; sprintf(msg,"Forename: %s", fname); //where fname has been previously defined as char fname[ ] = "Jonathon"; [/code] My main query is around the allocation of the memory for msg. I know there are memory … Software Development c | |
I am creating a program which takes in fields for events, saves them to file and then loads & displays them on separate lines. The 'date' field in my program should be in the format yyyy/mm/dd when it is entered. I have managed to implement this however my program still … Software Development python | |
I have a question on how to get the index of a selected object. I'll briefly explain my project to help get a better understand of what I'm doing. I have created a simple object (named InfoObject) which is made up of 2 jTextfields and 1 jComboBox. I have added … Software Development java | |
Hi, Im trying to figure out(again) the best(fastest) way to handle file management..Im using Win32 api, so I always try to use the api routines(instead of the c++ ones), dont know if this is better, but I just feel it is better in this way.. ( On "windows internals" book, … Software Development api c++ file-system windows-api | |
Hello, I am writing a program that does matrix Multiplication using 2-dimensional arrays and a Matrix Class. The program compiles without any errors but when I get to the part of the program where it actually multiplies the 2 matrices it throws an exception. I've looked through the code several … Software Development c++ ios matrix-multiplication | |
Stupid question, I'm sure: For an assignment I need to create a program that uses methods and constructors in several other classes... the classes were in a file that I unpacked and put in the same directory as the one I'm writing is in. What do I need to do … Software Development java | |
Considering no one seems to be-able to answer my other thread I'll try simplifying this one. I have created GUI frame which contains a menubar at the top. I have several methods as well as a method which paints 5 circles onto the frame. When I call that method, by … | |
Here is my code to write the arraylist to .dat file, And im not sure if its working but it writes to the file and i can see all the random characters so it is writing something but i keep getting io errors when i try to use the method. … Software Development file-system java | |
Hi, I know this is an old topic, but I still haven't found a solution I completely understood. So I'll just post my case. I'm trying to implement easyhttpd, a server class into an existing ogre class. This httpd server works with a callback function that I need to provide … Software Development c++ | |
Okay, this might become a monstous post, and I apologize for that. I recently switched from programming Java to C++ like a week ago, and can't seem to get all the pointers right it seems. Maybe all code provided in this post might seem a little overkill for the size … | |
Hi, I am new to Python. I have written a routine and am trying to compile the code for distribution. I went to [URL="http://sourceforge.net/projects/py2exe/files/"]http://sourceforge.net/projects/py2exe/files/[/URL] and downloaded the file py2exe-0.6.9.win32-py2.6.exe. I am running Python 2.6 on a Win-XP Pro OS. I assume this file is a self-extracting exe. The trouble is … Software Development file-system python | |
Hi, I am trying to use zlib library to use it in a string compression application. Look at the piece of code -- [CODE]uLongf DestBuffSize=0; compress2((Bytef*)CompDataBuff, (uLongf*)&DestBuffSize,(const Bytef*)d1, (uLongf)length, Z_BEST_COMPRESSION); [/CODE] In this code the variable DestBuffSize will contain the length of the compressed buffer. But the variable DestBuffSize is … Software Development c++ | |
Is it possible to have a function run at the beginning of every function of a class without explicitly writing it? I'm going to have a class with 20 or so methods, and though I can just copy and paste, I was wondering if there was an easier way to … Software Development python | |
Actually this is not an assignment or anything... School days are done... Still there's lot of things that i don't know... I just need some ideas on how to make an inventory using files... Basically, the file contains the name of the "Items" "Prices" and the "Amount"... I want to … Software Development c | |
Hello, I'm working on a little project. I need to have program which: [B]1.[/B] reads textline from user (example: A little cat goes to town) [B]2.[/B] a) reads words what user wants to change to 0 (example word cat to 000) b) one word to one line and if given … Software Development java | |
[CODE]#include <cstdlib> #include <iostream> #include <fstream> using namespace std; double average(int sum, int numElms) { int i; double avg; avg = sum/numElms; return sum; } int main() { ifstream fileIn; const int MAX_ARRAY = 500; int scores[MAX_ARRAY]; int numElms, sum; int i; fileIn.open("pgm5data.txt"); //open file if (fileIn.fail() ) { cout … Software Development c++ | |
could you help me????? how can i get an output like this: 2+9*32/3%2=96...it depends on the user on how much operators that he want to use. please help me of what statement that i have to use to have an output like this..... please post an example statement......... Software Development c | |
help how to make payroll using java program and the following conditions: 1.one dimensional array 2.two dimensional array 3. accept inputs of string, integer and double data types 4. validation using if-else-if 5. use of loops constructs 6. computation 7. summary 8. use of JOptionpane/system.out.print pleas help me Software Development java | |
Hello, I have a huge file with the following kind of lines: A,B,C 1,2,3 D,E 4,5 What is efficient way to split and get the following output using python? A 1 B 1 C 1 A 2 B 2 C 2 A 3 B 3 C 3 D 4 D … Software Development python | |
i need to write a program that determines whether a meeting room is in violation of fire law regulations regarding the maximum room capacity and the number of people to attend the meeting. if the number of people is less than or equal to the maximum capacity, the program announces … Software Development c++ | |
Hi, I've been working on a report and it has 2 subreports, one of them can outgrow the region destinated for it (on a preprinted paper), and I want to break the subreport on a new page of the main report (with page header and page footer). How can I … Software Development vb.net | |
![]() | Im getting errors with this, please advice me on what to do: [CODE]def displayHappy(): numLimit = input("Enter a positive integer: ") countHappy = 0 countUnhappy = 0 liHappy = [] for num in range(1, numLimit + 1): inNum = num while inNum != 1 and inNum != 4: inNum = … Software Development python ![]() |
I'm working in implementing a hash table, and I'm running into a Seg Fault whenever I try to access my buckets :( Here's the code: simple test class [code] //TEST HASH!! #include "hashTable.h" #include <iostream> #include <string> using namespace std; int main() { hashTable htab(101); htab.insert("blah"); cout << htab.contains("blah") << … Software Development c++ | |
Hi everybody, I wanna learn how can I solve this problem of undefined symbols while trying to load them from another function. Here's the code to explain: [CODE]void maxmin(struct ma mx) { int max=mx.ev[0]; int min=mx.od[0]; for (int i=0;i<10;i++) if (mx.ev[i]>max) max=mx.ev[i]; for (int j=0;j<10;j++) if (mx.od[j]<min) min=mx.od[j]; cout<<"The biggest … Software Development c++ | |
[COLOR="Red"]i have written this code to inser data in my database table "member "through the form but it is not working if i start debugging the code it gives no error but when i open my database table to see the inserted data it is not working. please help me … Software Development open-source vb.net | |
Hello, I am a totally newbie and I would be pleased, if you could help me. Here is the problem: I have created VS 2008 project and configured it for using the ITK (toolkit for medical image analysis - in my case for reading Dicom images). Everything worked OK until … Software Development c++ | |
Hi, I have a database table Files with a column Validated type of bit. Default is 0 and when a file is validated the column turn to 1. In my app I have two discs, a red one for 0 and a green for 1, so I would like to … Software Development vb.net | |
Hi I am trying to cross compile a simple program for Windows CE using CodeBlocks. I am using mingw32ce (part of CEGCC) which is a set of tools and libraries for building WCE programs on XP. And some WCE SDL libraries I found here: [url]http://users.uoa.gr/~knakos/scummvm/libraries/release-0-10-0/wince-gcc-libs.tar.bz2[/url] I have succeded in building … | |
I should create a Java program called FindThatNumber.java. The program should generate 10 random integers between 1 and 100 (inclusive) using Math.pow( ) and then store them sequentially in an array. The program should then ask the user to enter a single integer. If the integer is in the array … Software Development java | |
I need some help with understanding an error that I am getting. Can anyone help me. Here is my problem. I am trying to hardcode information for a mortgage calc and I am getting an illegal start of expression error. Here is an example: MortgageLoanCalculator.java:15: illegal start of expression double … Software Development java | |
I have a question about something that I don't understand which doesn't seem to affect anything. I have an application that uses a grid to find and select a detail record. I have two cells that contain phone numbers so I have a private sub that handles grid cell formating. … Software Development vb.net | |
I am trying to make a program so that you can enter your name, but I want to limit the amount of characters used to 10. This is what i have so far, and when i press backspace on my program, it doesn't delete the previous character but moves the … | |
How can i move the Rectangle on the form and animate it as it moves? If i want to move it for example to the right, i must increase it's X cordinate, right? I did it (++x) and drawed a new rectangle and overdrawed the old one with background color. … Software Development | |
Hello guys! In my application i have textbox where a student has to enter his/her name.I have validated it so that it accepts only letters but the problem is if i want to delete something when typing i have to use the delete button only.I cant use the space tab … Software Development | |
Hi everyone, I am having problems with my c++ code for about 2 - 3 hours now and decided I need help. I am a student at a college and I am trying to code this for my assignment. cpp file:[CODE] #include "bridgehand.h" BridgeHand::BridgeHand() { for (int x = 0; … | |
i need help on how to make a calculator program on C. for example: 100+3*(344-45)-3/20= ? ive done a part of it, but it doesnt even give the right answer. the user inputs anything (excluding letters and some puncts). it accepts the equation as a string. ive already converted the … Software Development c | |
Hello... Can anybody help me with this? 1. i have the images of our specimen card, located in my hard disk. 2. i want the image of the speciment card to be display in a picturebox when i type in the name. 3. i already made this in Ms Access … Software Development image vb.net visual-basic | |
I've never learn about pascal language and my teacher had some homework about cache working and he told me write it in Pascal. This is sample running. Main menu 1. Open fake disk 2. Read block to file 3. Write block from file 4. Close fake disk 5. Exit Enter … Software Development pascal | |
Hi there I am translating PERL code into python and i am new on both language.I have one question if we have hash key reference in PERL like this way $a->{b} how we can traslate it into PYTHON? and if we have this code $a->{$b} , how we translate it … | |
I have downloaded relo with mingw compiler. How can I run programm with it? or I should download somthing else? Or maybe you can write me some commands with which I can compile and run programm in command line. thank you Software Development c | |
How do I get a program to check to see if the computer is shuting down or logging off? I want to run code when the computer is shutting down. Software Development vb.net | |
First off, I know this is homework, and I don't expect anyone to do everything for me. Just a simple explanation is more than enough. The first project I am taking in a number in seconds that the user enters and converting it to hours, minutes, and seconds, but I … Software Development assembly | |
Write a method that computes future investment value at a given interest rate for a specified number of years. Use the following method header: public static double futureInvestmentValue(double investmentAmount, double monthlyInterestRate, int years) For example, futureInvestmentValue(10000, 0.05/12,5) returns 12833.590. Write a test program that prompts the user to enter the … Software Development java | |
Hey Every Body can u PLease help me with this this is a code 4 RSA it is workin' for small values of {p,q,e} like {11,3,7} but it does'nt work for {11,17,7} Please help me at this POint even long double is not enough for storing the value of c[i]^d … Software Development c encryption | |
Hi Everyone, I am having an issue with a small app I am writing. It takes a huge report from one of our clients, extracts a few columns, makes date calculations and spits out a csv file for our systems to update the databases. The problem is I am in … Software Development open-source vb.net | |
String class provides us with the method String.valueOf(some stuff) that basically converts "some stuff" into a string.. But we can also concatenate "some stuff" with an empty String (""). Both these methods result in a String representation of an object(or other data type) so my question is what is the … Software Development java | |
i am having problems editting my record where i basically want to select a record from the datagrid view and change any details where the data is displayed in the text boxes i have put on my form and click edit and have the data updated on to the database … | |
[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #define TRUE 1 #define FALSE 0 #define BUFFER_LEN 240 #define NUM_P 50 void str_sort (char *[], int); int main () { char *s[NUM_P]; int count; printf("Enter the number of count:"); scanf("%d",&count); int i = 0; printf("enter the first string:"); scanf("%s",&s[0]); printf("enter the second string:"); … Software Development c | |
I am having problem understanding nested loops, esp in making patterns with them. I am able to understand simple loops like these: [CODE]ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ [/CODE] code for this will be: [CODE]#include <stdio.h> #define ROWS 6 #define CHARS 10 int main(void) { int row; char ch; for … Software Development c | |
So I have looked and looked and wasn't able to find how to retrieve text from a selected option in a combobox. I have just started visual c++ so I don't really understand a lot. But I used to work with Visual C# before. So, is there any way? [CODE]if(comboboxslectedvaluethingy … Software Development c++ |
The End.