132,726 Archived Topics
Remove Filter ![]() | |
hi, I seem to gotten my code run. But what I want is to display everything into a dialog box all at once. So when I type 3 it would display all the factorials starting from three...to 15 and display them according to number / Factorials. 5 to 15 all … Software Development display java java-swing | |
this is the one I tried.. but it just can store digit up to 9... I need to store large number. can anyone help me?? [code]#include <iostream> #include <assert.h> #include <cctype> #include <cstdlib> using namespace std; #if !defined STACK_H #define STACK_H const int maxStack = 100; class IStack { friend … Software Development c++ | |
I'm trying to convert decimal to binary and I'm having a lot of trouble (new to python). I was wondering why that won't work. Thanks. EDIT: Argh, I'm so sorry but I got it fixed. It turns out that the assigned variables are on the wrong side. Software Development python | |
I have found a program and tried using 'DEV C++' but it only reported an error report. I later then discovered that is was because 'DEV C++' used C++ when the code was designed for just plane C. I have searched the web and this forum but only found two … | |
I do not want to misguide anyone responding, I am a newbie to the C++ arena. I am just doing little starter programs to figure things out, but for the life of me I don't get the whole hInstance thing. The objective I have is to learn C++, write a … Software Development c++ objective-c windows-server | |
I am looking at this recipe: [url]http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440509[/url] When I tried to do it, doesn't work. why? [CODE]>>> from sets import Set >>> new_list = [2,34,5,5,6,6,7,2] >>> print new_list [2, 34, 5, 5, 6, 6, 7, 2] >>> new_list = Set(new_list).elems Traceback (most recent call last): File "<interactive input>", line 1, … Software Development python | |
![]() | My problem was over here: [url]http://www.daniweb.com/forums/thread93806.html[/url] After many advices, helps, I could eventually solve this problem myself, happy~~:D All I did was to write a replacement function for strcmp() and then use a bubble sort function to sort input strings in lexicographical order. Much simpler than nasty nested loops :P … |
thought i'd make a program for fun.. although to be safe im cutting it up into many forms to save room. Anyway doing this means im going to have to get alot of the variables from the forms back to the original page, and then back to a different form … Software Development vb.net visual-basic | |
hey, I am a beginner in c++ and i think i have learnt a little about how the program functions... I have been able to write programs that can run only in the DOS mode and i cant even write a windows application but i now understand the program a … Software Development c++ | |
I need help with this problem. I have written the code. The function main() stores the message in an array. What I need to figure out is how to have the function restaurant accept the message as an argument(which is named menu) and display the message using pointer notation *(menu+i) … Software Development c | |
So I have this code (the unnecessary parts omitted): [CODE=c++] #include <stdio.h> #include "scene.h" int main() { while(1); return 0; } [/CODE] And another file in the project called "scene.h". When I compile, I get these errors: [CODE] new types may not be defined in a return type extraneous 'int' … Software Development c++ | |
Hi all I am using a tutorial on youtube[URL]http://www.youtube.com/watch?v=sIy3oOguh_0&mode=related&search=[/URL] and it is going well apart from I can't compile the latest program, a calcualtor my compiler (devC/C++) keeps highlighting the endl; near the end of the code, i have placed a comment above it. I have checked the video many … | |
Write a program that prompts the user to input a number of positive integer values which is terminated by an appropriate sentinel value (you can choose -1 as the sentinel value) and then prints out the largest value, the smallest value, the average value and the number of prime numbers … Software Development java | |
How can i make a string that will allow me to Use Spaces between the words ??? This code only allows me to post words without spaces. [code] cout << " Enter the Name of Employee # " << i+1 << ": "; cin >> N; myClass[i].setName( N ); [/code] Software Development c++ | |
I am currently studying the impact of microarchitectural techniques. I have been looking at code and how to stall it correctly, as well as how to make it more efficient. I have been doing this through several different methods and then measuring the cycles per iteration. I was wondering if … Software Development assembly | |
![]() | Hi, I want to write a function to perform lexicographical sorting using a simple bubble sort technique. So far I've got the basic code running, but something is not right. I can tell the algorithm is wrong but cannot fix it, please help. [CODE]int bubble_sort(char **words, int num_word) { int … ![]() |
Hello there. I am very new to C++ and still rather new to programming (Im only in high-school). I am trying to make a decision based game that runs in a cli to just get going with the language syntax somewhat. So far the game is working, and I made … Software Development c++ | |
Ok, I'm trying to write a little game in c++ using very simple graphics. not opengl or anything like that. Everything compiles fine (There are some warnings, i know how to fix them im just lazy, ill do it later) all of my code worked perfectly until i added the … ![]() | |
#!/usr/local/bin/perl #check_oracle# use strict; use DBI; use Net::SMTP; $ENV{'ORACLE_HOME'} = '/app/oracle/product/9.2'; my $errors; my $total = 0; check_oracle(); if($total > 0) { my $mailer = Net::SMTP->new("142.1.0.1"); $mailer->mail('dpr-prod@repl1.newport.net'); $mailer->to('root'); $mailer->data(); $mailer->datasend("Subject: DPR database"); $mailer->datasend("\n"); $mailer->datasend($errors); $mailer->dataend(); } sub check_oracle { my $username = '######_@@@@'; my $password = '@@@@'; my $tnsalias = … | |
Hi all I'm studying C and I have to do an exercise that requires me to open a file and count the number of times a letter occurs,either small or capital. For example,I have a text file in C:\text.txt with the contents "World In Conflict".So in my example the letter … ![]() | |
Hello- I need to do a selection sort on two different 2d arrays, sorting by the last column of one of them (thirdarray). The first column of thirdarray is the effective column size for the first (morearray) array. I am so confused. I cant find any examples to help me. … Software Development c++ | |
This is the current assignment: Write a program that determines which of 5 geographic regions within a major city (north, south, east, west, and central) had the fewest reported automobile accidents last year. It should have the following two functions, which are called by [I]main[/I] [I]int getNumAccidents()[/I] is passed the … Software Development c++ | |
Hello, I am trying to call two functions: one that pulls data from a file and stores into a linked list, and one that displays this data to the screen. I pulled my code out of the functions and created a new file and included everything in the main function, … Software Development c++ linked-list | |
hi, can anyone pls find out the problem of my code. Code: public class binarysearch { public static void main ( String[] args ) { int[] array = {2,2,10,20,55,100}; int target = 2; int left = 0; int right = array.length - 1; int mid = -1; while ( left … Software Development java | |
I have written a CString Object into Text file by using : f.Write (&FileName,FileName.GetLength());//FileName is CString Object Now I want to Read CString object back How this could be done?I am using code : LPTSTR p = CurrentLanguageName.GetBuffer(11); void *g=(void *)p; f.Read (g,CurrentLanguageFileLen); CurrentLanguageName.ReleaseBuffer( ); //But this method don't work. … Software Development c++ file-system | |
I am trying to read matrix data from file into a float vector the file has data like X = {1.0, 2.0, 3.0...........} Y = {3.4, 3.1, 3.4...........} I can read into vector strings. But I want to store the matrix names in a string vector and the matrix in … Software Development c++ | |
removes comments from the given program and prints to the other file [CODE=c]#include<stdio.h> void main(int argc,char *argv[]) { FILE *in,*out; char ch1,ch2; int f=0; in=fopen(argv[1],"r"); out=fopen(argv[2],"w"); while(!feof(in)) { ch1=getc(in); if(ch1=='/') { if((ch2=getc(in))=='/') { while((ch2=getc(in))!='\n') { ; } } else if(ch2=='*') { while((ch2=getc(in))!=EOF) { if(ch2=='*') { if((ch2=getc(in))=='/') f=1; } if(f==1) break; … Software Development c | |
I made this Data Table. The problem is when the outputs are different it will change the shape of the Table. I need some tips on how can i fix this problem. [code=cpp] [INDENT]double sum = 0; for ( int j = 0 ; j < 5 ; j++ ) … Software Development c++ | |
Hello to all. I have a project which is scheduling system using vb6. I can't or don't know how to find the time conflicts of each subject at the given day and given professor. For example user select the section name then a combo box for selection of subject then … Software Development visual-basic | |
why does this file outputs 516?? The value of numbers is being read from random.txt that has 200 random numbers in it. I was expecting this to output 200 and NOT 516.. whats up with this? [CODE] while (inputFile >> number) { //number of numbers on the file for (totalNumber … Software Development c++ | |
Hi all this is the 2nd exercise I can't seem to figure out how to do.Exercise goes like this : One method of encryption is this : We pair the letters of the alphabet to the numbers 0-25. Assuming we have a text "T" and a keyword "K" of "V" … Software Development c encryption | |
how can i export a database from access to excel but in a tabular form(calendar form)?tnx!!! Software Development visual-basic | |
Am a new c++ programmer. I refer to the code " Bouncing Ball" which is a GUI, now there is a rectangle created, i managed to change the color the rectangle in the main window and what my may problem is how to make the rectangle fixed and not only … | |
hi...my name is agus ..i'm from indonesian...i'm new here... i want to ask something... i have project but i dont know about my wrong and solutions....this is mY project [code=c] void OpenGLInit(void); static void Animate(void ); static void Key_r(void ); static void Key_s(void ); static void Key_up(void ); static void … Software Development c | |
this is a small example from the gsl example online I need to get the value from the "&evec_i.vector " into a 4x4 dimensional array such that abc[4][4]= vector elements how can I do this ? those 16 values will create the 4x4 matrix [code] #include <stdio.h> #include <gsl/gsl_math.h> #include … Software Development c | |
Hey, again... I've got another assignment coming up and I'm having issues... again. Basically, my major stumbling block is figuring out how to set the int number = returned value of enterNewNumber. Also, is there any simple way I can store the digits of an integer as seperate numbers in … Software Development c | |
my program is written in c and compiled and linked with gcc. In normal way; i execute it by giving an argument after writing executable. [code] ./my_executable abc.dat [/code] and it works. i need to execute it in gdb debugger. how will i give this abc.dat argument to the gdb … Software Development c | |
Can anyone tell me what the purpose of C functions which start with "__" ? Also another question is the same use of the "__" in defines like #define __HTTP_VERB_GET "GET" Software Development c | |
Hello eveyone, I am kindda new to daniweb. I was hoping that someone would give me some hints on where to put the running total and how to quit once the user types 0 for hours parked(my teacher asked for this feature) I would enormously appreciate the help! A parking … Software Development | |
Hi, My friends, I am new to python. I try to figure out how python knows the end of loop or the end of a block of codes in while... else code Here is the example: while E: Bt else: Bf here if Bf have 20 lines of code. How … Software Development python | |
please help. im writing an app that will send and receive sms using vb.net. i dont know how to start Software Development vb.net | |
Hi People I'm a newbie in c, I learn in c++, but I don`t really know to much. A friend make a code in c, working in a linux pc. And works perfect. I normally work in Micorsoft Visual Studio, but this c code, seems not to work well (88 … Software Development c visual-studio | |
Does anyone have a solution/c++ code to make bmp images transparent on the fly without having to carry out 2 bitblt operations with the image and it's mask ? We want to develop a game in which there are many moving objects which have to be rendered transparent at new … Software Development c++ | |
this code removes comments please help in correcting the code //Program to print a file by removing Comments #include<stdio.h> void main() { FILE *fp; char ch; //clrscr(); fp=fopen("temp.txt","r"); while(1) { ch=fgetc(fp); if(ch==EOF) break; else { if(ch=='/'){ ch=fgetc(fp); if(ch=='/') { while(1) { ch=fgetc(fp); if(ch=='\n') goto label; } } if(ch=='*') { while(1) … Software Development c | |
I am trying to print this to a dialog box. The code prints to console and prints, 1,2,3,4....12 to the dialog box. Can someone give me some advice on printing to a dialog box the verses to the dialog? [INLINECODE] import javax.swing.*; // program uses class JOptionPane public class TwelveDays … Software Development java java-swing | |
1)I need to compare two directories .if the files which r not same in the two directories i want to list them in a new text file can anybody help me solving this question 2)how to write in a file in a String format using java? satish.paluvai Software Development java | |
I am new to Daniweb and I need some help with my programming code in Unix. I have written an if-else statement for Bash Scripting and it doesn't work. I have been told that variables would help with my code but I still don't see my program working. I'm suppose … Software Development shell-scripting unix | |
How do I change my file extension from me.cpp to me.out or me.cpp to me.exe using Bash scripting. Thanks! Software Development shell-scripting |
The End.