199,114 Archived Topics
Remove Filter ![]() | |
I wonder it it is possiblibe to write function to swap two variables like in C [code] void swap (int* x, int*y) { int temp; temp = *x; *x=*y; *y = temp; } [/code] I already tried with soemthing like this: [code] def swap (x, y): tmp = x x … | |
I am a novice to C++ but I am trying to improve. Ive started reading quite a few books which include: Learn C++ in 10 minutes - Jesse Liberty C++ Game Programming - Michael Dawson Im still in the first 100 pages in both so im not into to advanced … | |
I have found some interesgting websites which have excellent java applets that explain physics theory. I could only view those webpages when attached to the internet, but then I learned I could download the *.class file related to the applet and then I would be able to open the webpage … | |
does the datatype float also have a over-/underflow like an integer? If yes, how can I create a float-underflow? thanks dave | |
Hello everyone, I'm new here and have browsed through some discussions and found it useful. I was wondering if anyone could help me with a functional programming problem in Haskell. Im trying to define a function seg, which is supposed to take a finite list xs as its argument and … | |
Hi Everyone, I want to program something cool (no this isn't for school, just for fun), but I don't know what to program. I wanted to make something that would be fun to make and use, but not too challenging. Any ideas? Thanks a lot. | |
I am trying things with wxStaticText (a label). I can chnage background colour, but not the text colour: [code]import wx class MyPanel(wx.Panel): def __init__(self, parent, id): wx.Panel.__init__(self, parent, id) str1 = "Camembert cheese is the best!" self.label1 = wx.StaticText(self, -1, str1 , wx.Point(15, 30)) self.label2 = wx.StaticText(self, -1, str1 , … | |
I mam having problems doing somthing fairly simple. ;) . What i have is a listview with about 1000 items in it. All files paths that i have scanned from a directory. And there are 4 colums. First the name, then the size, extesion ect. the last is the path … | |
//square matrix #include<iostream.h> #include<conio.h> #include<stdio.h> int main() { void diagsum(int a[10][10],int n); void rowsum (int a[10][10],int n); void colsum (int a[10][10],int n); int a[10][10]; int n,opt; cout<<" enter the size of matrix (say 4 for 4/4etc..) "; cin>>n; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) {cin>>a[j]; } } for(int k =0;k<n;k++) { … | |
i have to convert a program from c++ to C language and at one point in my program im stuck where its dealing with dynamic memory of an array. i started it but i dont know how u do dynamic memomory in c language. [code] if (reply == '1') { … | |
#include<iostream.h> #include<conio.h> int main() { void sortarray(int array[15],int size); void mergearray(int ar1[15], int ar2[15], int ar3[30],int m ,int n); int m, n ,ar1[15],ar2[15],ar3[30],array[15],size; cout<<" Enter the size of the arrays "<<endl; cin>>m>>n; cout<<" Enter the elements of first array "<<endl; for(int i=0;i<m;i++) cin>>ar1; cout<<" Enter the elements of second array … | |
Hi all, I've programmed [B]C[/B] & [B]C++[/B] during my college days. I understood its [I]OO model[/I] and coded many examples (this helped me in OO [I]PHP[/I] now). I used something called [I]Turbo C++[/I], a set of some confusing files, which can be carried in a floppy or two. [QUOTE]I now … | |
I am using Tkinter as my gui programming addon for python but i think it would be better to lean something else.... do you know where there are any good pyWin32 or wxPython tutortials? Help is apprecaited. :cheesy: | |
Ok i am having alittle problem with my code, I am getting 4 errors for having these things unidetitfied but they are so I dont know what is is here is the code that I have so far. The object is to have counters that will count how many comparisions … | |
Write a program that calculates the average marks of three subjects of a student, entered by the user through keyboard and store them in three different float variables having names marks_subject1, marks_subject2, marks_subject3 The formula to calculate the average is: average = (marks_subject1 + marks_subject2 + marks_subject3) / 3 Your … | |
Does any body know how to save your contacts in outlook to the harddrive. i no how to list them. but then i tried the save as methosd. oContact.SaveAs("C:\contacts\" + list.selectedItem + ".vcf", null); and that doesnt work. Any ideas? my code... [code] Outlook._Application olApp = new Outlook.ApplicationClass(); Outlook._NameSpace olNs … | |
![]() | Hi, we all know that java has a very very very ugly interface. Well the default one anyway. Is there any way to make it better. Like maybe this. If so how do you do this. But freely [url]http://www.javasoft.de/jsf/public/products/synthetica[/url] And does this mean when you make it into a jar … |
Do you think vbulletin was worth $85 to me. My site is... [b]<< url snipped >>[/b] Well, thanks | |
Does anyone know wether i can convert a Java written program to C? Thank You | |
what is the target of pointer to function? when do i use pointer to function? :?: | |
I have to develop a C++ program that reads the data records from the input file and stores them in a dynamic array of structs, which should be sized just enough for the problem. (TIP: Your program should first scan the input file to determine the number of records to … | |
[code] #include<iostream.h> #include<conio.h> #include<stdio.h> int main() { void palcheck(char str[]); char ans; char str[20]; do { cout<<"Enter the string to check if it is a palindrome. "; gets(str); palcheck(str); cout<<"\nEnter Y to continue. "; cin>>ans; }while (ans=='y'||ans=='Y'); } void palcheck(char str[]) { int l=0,k=0,flag; for(int i=0;str[i]!='\0';i++) l=l+1; k=l; for(int j=0;j<l/2;j++) … | |
Need help in finishing this problem. I was doign ok at first but somehow ran into 2 compile errors. Now I'm tired and going in circles. I need a fresh pair of eyes to look it over. This is my first time doing arrays. [code]#include <iostream> #include <string> #include <iomanip> … | |
ive made a dll in c, and it gets called with visual basic. in vb one of the parameters i pass is the address of a vb function. i can get the dll to run the function fine, but i need to put that address into a struct to pass … | |
Please can someone help me. i don't know where to start. i need to write a programme in c/C++. the features of the programme are stated below: Write a program for Windows XP that makes a countdown timer in your Tray (at the bottom of the screen). When you right … | |
Hi, I own a multiplayer gaming site and the games on it I bought. It came with a gaming lobby and the games themselves, with the backend server stuff too. However, my knowledge of java is a bout as extensive as a three year olds knowledge of Father Christmas not … | |
I can't figure out what I am doing wrong. I am learning JavaScript and am lost. Can someone please offer guidance. :confused: <html><!--Kimberly R. Owens--> <head> <title>Jennifer's Floral Garden</title> <SCRIPT LANGUAGE="JAVASCRIPT"> <!--Hide from old browsers function roller() { var banner = new Array("images/florist.jpg", "images/florist2.jpg", "images/florist3.jpg"); var banctr = '0' if … | |
I have written a binary search algorithm in java. I have a statement that when the search key is found it is printed to a terminal window. This statement when when called just keeps printing over and over and i cant figure out why :sad: . Can any one help? … | |
You created a bunch of random numbers, but say you don't want a bunch of random numbers exactly. Say you have ten members of a team and you want to give them a random position represented by 0 to 9. So you create your array and you fill it with … | |
Doesn't C# support EBCDIC encoding? I'm working on a project that involves parsing Xerox Metacode print streams, encoded as variable-byte EBCDIC records. The print stream data itself is in ASCII, but the record headers and control records are in EBCDIC. I read the records in as byte arrays. I know … | |
I need help in creating a python program that plays MP3s, using the [URL=http://www.pygame.org/news.html]PyGame[/URL] package to play both MIDI files, and Ogg Vorbis files. Using a menu that would look something like this: 1. Go to new music directory. 2. Play a song or playlist. 3. Stop music. 4. Create … | |
![]() | Hi all, I'm importing external data into Microsoft Excel XP from a database. Not wanting to query all 70 databases we have I'm thinking a macro or some visual basic would work nicely to automate this. However, I'm stuck because everything I read tells me that one cannot query multiple … |
I am using the following class. RichTextBoxPrint.vb Option Explicit On Imports System Imports System.Windows.Forms Imports System.Drawing Imports System.Runtime.InteropServices Imports System.Drawing.Printing Public Class RichTextBoxPrint Inherits RichTextBox ' Convert the unit that is used by the .NET framework (1/100 inch) ' and the unit that is used by Win32 API calls (twips … | |
Hi All, Im trying to implement a trie in java(which is basically a tree used to store words). I have the following method to add a word but am unsure how i would go about check to see if the prefix of a word already exists. Heres my code: public … | |
:rolleyes: I have a control that I drag and drop. I would like to use the below instead of building a dll. I want to call the subroutine. Is there a way I can do so? I am not aloud to use build any extra dlls in the project. If … | |
Hello guys, I have [COLOR=DarkSlateBlue]Oracle9i[/COLOR] installed in my homepc and my O.S. is [COLOR=Navy]Windowsxp-professional[/COLOR]. Now,I want to connect Vb using [COLOR=Indigo]Microsoft OLE DB Provier for oracle[/COLOR]. For this i have done the following steps--- 1. Created a text document and renamed it with extension .udl 2. On openning the file … | |
I've written a Java application using Netbeans, and I was wondering if there is any way in which I can run this application using an executable file in windows rather then having to run it through Netbeans itself. Is this possible? | |
Hello, I have a software package for monitoring warehouse transactions. I have a need to share information across many users in several different locations.I don't want to network the pc's i can't afford that. i however notice that putting the information online saves a lot of cost for me. I … | |
The Internet has many animated GIF files, they are funny to watch. Does Python have a way to play those? I am asking to much? | |
The object here is to open a selected Word file and Copy&Paste its contents into a text file. The problem seems to be with the Sendkeys commands having no effect. The project freezes, apparently because Notepad has not been closed (by Sendkeys "%FX"). Can anyone tell me what's wrong? :confused: | |
For research, the admissions office wants to compare how well female and male students perform in certain courses. You are asked to write a program that prompts the user to enter a number of student records consisting of (a) student’s sex (‘f’ for female, ‘m’ for male) and (b) GPA … | |
Hi everyone, I have a question about Visual Basics......... When do the following events occur with a form object: Load, Unload, Activate, Deactivate, GotFocus, LostFocus? | |
I'm working with sql servre database I have two tables in the same database. thse are my tables, [code] CREATE TABLE [dbo].[Applicant] ( [UserID] [int] IDENTITY (1, 1) NOT NULL , [UserName] [varchar] (50) COLLATE Latin1_General_CI_AS NULL , [EducationDetails1] [varchar] (50) COLLATE Latin1_General_CI_AS NULL , [EducationDetails2] [varchar] (50) COLLATE Latin1_General_CI_AS … | |
A somewhat strange find in the Pyton Code Snippets here on this site. Is the BOO language very much like Python? It seems nice that one can compile and interpret the same language. Will it be worth to translate Python code to BOO just to get a nice small exe … | |
I have a program where I want to point the same ifstream to another file when I am done using it. Currently, I have it set up something like this (pseudocode): //Global File Name char *mmFileName[50] void calculateISI() { ifstream minmaxFS; //sets the global file name if(condition) setGlobalFileName(); while(//assume true) … | |
#include<iostream.h> #include<conio.h> int main() { int a[5],loc,val,ans; do { cout<<" enter the elements "<<endl; for(int i=0;i<5;i++) cin>>a; cout<<" enter the location u want to edit with respect to zero "; cin>>loc; cout<<" enter the val to be inserted "; cin>>val; for(int j=6;j<0;j--) { if(j==loc) a[j]=val; else if(j>loc) a[j]=a[j-1]; } for(int … | |
Can anyone point me in the direction of a site that has a good tutorial on using Tab Controls on a MFC program? | |
Hi guys: I am very very new in C++. In school they required me to write a program that reads the names of the students registered for a class and output that result in a file. I got almost everything done. The only problem is with the function getline. I … | |
Having a problem with a user logging in and getting a different users information. Only thing I can think of that changed was I replaced a few Response.redirects with server.transfers. It is happening randomly (or, if there is a pattern, I haven't figured it out yet). Ever heard of anything … |
The End.