43,549 Solved Topics
Remove Filter ![]() | |
Hello all, I am trying to figure out how to make my program do the following(it's a table): The user enters a beginning amount and interest rate. The year, beginning amount, interest and end amount are all supposed to keep increasing until the end amount is doubled of the beginning … | |
how can I will make a student database using linked list in c++. Software Development c++ linked-list | |
I am trying to do an exercise from Stroustup's book. The task is to create an array of 7 ints, assign its address to another variable, then print out the array value and the address. My code is below. [code] int main () { int p0[7] = {0, 0, 0, … Software Development c++ | |
Hello. i was trying to solve this problem. [B]Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it.[/B] Well, what i did is, use an array called present, to flag the elements ie: [CODE] for (i = … Software Development c | |
Dear friends, I am a new programmer and i have a task to make a phonebook with python. Please help me to finish my task. The program should repeatedly ask the user for input. Each primary input is one of the words “help”, “lookup”, “enter”, “remove”, and “quit”. If the … Software Development python | |
I'm using visual studio 2010 and even though I'm not new to VB.NET I still want to get the best possible book that can teach me what I need to know. Any suggestions? Software Development vb.net visual-basic visual-studio | |
This is my first function in python and i need to get item quantity and price loops into the function Processorderitems. I took out the items loop because I was not doing anything with it. I need to return the subtotal and I have a 3% discount for quantities over … Software Development python | |
new to ArrayList and was wondering what I am doing wrong. I keep getting a null pointer exception when trying to addRecord... [CODE] import java.util.*; public class StudentDB { private List<String> studentDB; public StudentDB(String db) { List<String> studentDB = new ArrayList <String>(); studentDB.add(""); } public void addRecord(String recordAdd) { studentDB.add(recordAdd); … Software Development java | |
I've coded this program but i am getting this error, EmployeeeMain.java:57: non-static method getdata() cannot be referenced from a s tatic context Manager.getdata(); ^ 1 error I've used the same technique in other program , it is working fine but this program is not working !! Why I am getting … Software Development java | |
[code=c] printf("\nn = %*d", 5, 4); [/code] and the output is: [code]n = 4[/code] (yea! there are spaces between = and 4) if i am providing only one argument 5 instead of 5 and 4 i get an error stating too few arguments. What in the world is the "*" … Software Development c | |
Hi there, I am working on a palindrome program which is here: [CODE]#include <iostream> #include <string> using namespace std ; int main( ) { cout << "Insert the word to test: " ; string word ; string test ; int i ; int j ; cin >> word ; cout … Software Development c++ | |
#include <stdio.h> #define p printf #define s scanf int program,Y,N; do { p("Choose from the following program\n"); p("1 for program no.1"); p("2 for program no.2"); p("3 for program no.3"); p("4 for program no.4"); p("Continue (Y or N)?"); repeat = getchar(); putchar('\n'); }while(repeat == 'Y' || repeat == 'N'); } program1() … Software Development c | |
Here's the code I need to loop: [CODE] dmg = random.randrange(1, 10, 1) print "You have decided to attack the giant rat." ratHP = 100 ratHPN = ratHP-dmg print "you did" , dmg , "damge to the rat, giving it" , ratHPN , "left" ratHP = ratHPN [/CODE] If you … Software Development python | |
Hi I am trying to write a simplie login perl script all is working apart from the final if statement. if the username and password match the data stored in the txt file $auth returns true which works then a second if checks if £name is != to "admin" if … Software Development perl | |
Hi,I have tried to get this program to work,but it works to the moment when you enter some of the array`s numbers and then crashes.In different sizes of the matrix you can enter different number of numbers,but for instance when the matrix is 5x5 the program crashes after the 11th … Software Development c | |
I am Writing a program which converts latin text to original Language script. this where i have gone so far [CODE]' Mapping for Ascii to Unicode Private mapAsciiToUnicode() As String = {"h" => "1920","S" => "1921", "n" => "1922", "r" => "1923", "b" => "1924", "L" => "1925", "k" => … Software Development vb.net | |
Hi all, I would like to ask. Im Fairuz and the new member for this forum. I having problems to sort the multi dimentional array in python. ie: [('DcaUiVb_B09398-11', [None]), ('m3sui_R66441-35', []), ('m3sui_r26557-01', []), ('m3sui_R31225-24', []), ('m3sui_r66147-03', []), ('m3sui_R31225-23', []), ('m3sui_R30803-10', [])] I have the list but im having problems … Software Development python | |
Hello guys i am in level of class and objects i need some help and guide in copy contruct i search the thread and found 1 [url]http://www.daniweb.com/forums/thread21662.html[/url] but this is not what i want... ok here is the problem.. i created contruct class ... i want in program that create … Software Development c++ | |
I'm starting to learn the Pep/8 simulator. Do you know where i can find some tutorials? Thanks. Software Development assembly | |
I'm new to recursion and am wondering how the output of the code below is 6. So from what I can understand, there are 2 base/anchor cases which return 0 or 1? Is this correct? And the recursive/inductive case is the f() calling f(), but I'm confused on what it … Software Development c++ | |
hi people can anyone help me how to simplify these codes? [CODE]Set oExcel = CreateObject("Excel.Application") Set oBook = ThisWorkbook Set osheet3 = oBook.Worksheets("DBASE") Set osheet4 = oBook.Worksheets("List Box Lookup Demonstration") Dim listIndex As Variant On Error Resume Next osheet3.Select Range("b65536").End(xlUp).Offset(1, 0).Select Selection.Value = ListBox2.List(0) Selection.Offset(0, -1).Value = TextBox2.Text Selection.Offset(0, 1).Value … Software Development visual-basic | |
Windows is shutting it down with a send error message option. [CODE]#include <iostream> using namespace std; struct attrib{ char x; int y; char cont; }; attrib brd[8][8]; int main() { for ( int x =-1; x<8; x++) //accesses all columns in the array { for ( int y=-1; y<8; y++) … Software Development c++ | |
Here are my questionsand my answers. Could you guys/gals tell me if i am right or wrong? Which array-based operations are O(1)? inserting item or deleting item in unsorted array Which linked-list operations are O(1)? inserting and deleteing item in unsorted lsit Which array-based operations are O(n)? traversing through the … Software Development c++ linked-list | |
The user enters a number and the program should output that amount of rows and colunmns. I have tried a couple of different ways butcant quite get it even though I think I am close. for example if 10 is entered it should look something like this: O OO OOO … Software Development python | |
I'm coming from Python to Visual Basic and it's really playing with my head. This program is intended to scan a list of directories (only have one directory so far) and see if they contain any files. If they do, their directory is added to a list (DirtyFolders) and all … Software Development visual-basic | |
I created my own header file in C by creating the ff. files: myfile.h, myfile.c and main.c.Afterwards, I compiled myfile.c so I already have the object file for it, but the problem is when I compiled and run main.c this error message appeared: "Undefined symbol _sum". Please help me to … Software Development c file-system | |
i wanna ask about this statement... [CODE]int a[] = {0};[/CODE] the value all of a is it equal to 0 ? i mean all of the location of a.. Software Development c | |
Hi. How can i find how much windows are running at the same time? For example i need to find how much Calcultators are running. I tried using [iCODE]FindWindow()[/iCODE] but it always returns me same handle. Any ideas? Thank you Software Development c++ | |
Hi, Maybe this is a simple question... I want to open a 2nd form using a load click button. I already did it: [CODE]private void loadbtt_Click(object sender, EventArgs e) { ScndForm.Show(); ScndForm.Update(); // Rest of the instructions for load button }[/CODE] The problem is that it is only showing the … Software Development | |
Hi dear all ! I am programming a windows form application using C++.net(CLR). In my program I am to draw a flow chart or such shapes with undetermined length, so I must scroll the form to enable user to see all parts of the shape. I enabled AutoScroll method of … Software Development c++ | |
I am trying to output a checker pattern into a two dimensional array. How do I assign two characters in order to do this? Note array is a square [5][5] Please help. [CODE]// Takes two symbols and places them in alternate cells of board public static char[][] placeSymbols(char charY, char … Software Development java | |
I followed through a Java/LWJGL n lloydgoodall.com for a first person camera. There were about 33 errors that I fixed, though I get a message in the Eclipse console "java.lang.NoSuchMethodError: main Exception in thread "main" " Here is my code: [code] import org.lwjgl.Sys; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.GL11; import org.lwjgl.input.*; import … | |
I have a text file with a few cars brands and some information for the cars. I want the cars together with the information for the cars to be sorted in alfabetic order. Anyone can help me to get this working? This is my code: [CODE] #include<fstream> #include<iostream> #include<string> #include<conio.h> … Software Development c++ | |
This seems to be weird: [code] int main(int argc, char* argv[]) { cout << "function main() .." << '\n'; char ch = 0; double number_value=1.1; cin >> ch; cin.putback(ch); cin >> number_value; cout << "1 .. " << " " << cin.good() << " " << number_value << '\n'; cin … | |
This is my code for drawing a circle using mid point algorithm:- [CODE] //Midpoint circle algorithm #include<graphics.h> #include<stdio.h> #include<conio.h> void drawcircle(int xc,int yc,int r); int main() { int gdriver=DETECT,gmode; initgraph(&gdriver,&gmode,"..//bgi"); drawcircle(250,250,10); getch(); return 0; } void drawcircle(int xc,int yc,int r) { int p,x=0,y=r,incr1=2*x+3,incr2=incr1+2-2*y; void drawPixel(int,int,int,int); drawPixel(xc,yc,x,y); p=1-r; while(x<=y) { if(p<0) … | |
hi! please help me. i want my data report to be in landscape mode. i've read many forums and they suggest to install vb6 sp6. i've already downloaded it from MS site and installed it. and now when i open my project in vb6 and type datareport1. there is no … Software Development visual-basic | |
Hi guys, I have a problem with a program: #include <iostream> #include <string> using namespace std ; // Uses a class with "public" member variables, so directly accessible class Student { public : string name ; int reg ; } ; int main( ) { const char NL = '\n' … Software Development c++ | |
hello eve one, i'm student of Bsc (IT) i have to made one small application in VB with in month so whould u pls suggest me any application which can be made with in one or one & half month .... thanx in advance... Software Development visual-basic | |
hi everyone!!! need help here, how can i pass a string to a class? i have two forms and a class, my 1st form is the main form and the other form is used for assigning to a keyer, this form has a combobox where i will select the keyer … | |
I want to generate 10 random numbers. but all numbers will be different. so I tried to use bool first make all false. and each generate, assign that argument with bool but someting is wrong. because outcome is not correct. [CODE]#include <cstdlib> #include <iostream> #include <ctime> #include <windows.h> using namespace … Software Development c++ | |
hi Everyone !! i need help guys with hash table in c ..could anyone help me by a little explaination of how to use hash tables ...please give examples.. Thanks in advance for all. Software Development c | |
I've been doing programming in tkinter for awhile now and I came across a problem...this problem only shows up after a single part but here is the code...kinda lengthy.if you go to the equip menu and equip bare neck you can't change necklaces again. any help in shortening this or … | |
I need to create an application that displays math problems by randomly generating two numbers, 1 through 10, and an operator (*, -, /, +) and prompts the user for an answer. The application should check the answer and display a message, display the correct answer and generate a new … Software Development vb.net | |
I have to write a C++ program that finds all the perfect numbers between 1 to 10,000 and print out the factors after the code finds them. I have written the code to find the numbers, but cant seem to wrack my brain on how to make the factors print … Software Development c++ | |
Is something like this possible: [CODE=C#] int MyParameter = 3356; DataTable x = new DataTable("CommandParams"); x.Columns.Add("ParamName"); x.Columns.Add("ParamType"); x.Columns.Add("Object"); DataRow y = x.NewRow(); y["ParamName"] = "@SomeParamName"; y["ParamType"] = MyParameter.GetType(); y["Object"] = MyParameter; SqlCommand z = new SqlCommand(); z.Parameters.Add(new SqlParameter(x.Rows[0]["ParamName"], (x.Rows[0]["ParamType"])x.Rows[0]["Object"]); [/CODE] I'm trying to come up with a method that can … Software Development | |
I wanted every variable in the array to have .x, .y, and .cont, the error occuired on line 11: [CODE]#include <iostream> using namespace std; struct attrib{ char x; int y; char cont; } attrib brd[8][8]; //ERROR WAS HERE int main() { for ( x=-1; X<8; x++) //accesses all columns in … Software Development c++ | |
Hi all, I am new to XAML however I have an understanding of XML. I am trying to bind a button to an XML file such that when the button is clicked, it the xml element is displayed within a listbox. Then I want the listbox selected item to be … | |
![]() | I need to write a program that changes a Roman Numeral to a numeric value. I've been inputing the roman numeral "CCLXXXVII", expecting it to output "287". Instead I've been getting "7101". Here is my code: [CODE] #include <iostream> #include <string> using namespace std; const int VALUE_I = 1; const … Software Development c++ ![]() |
How do i create a large array in c++? Apologies if this has been answered already but after searching didn't find what i was looking for. i want to create an integer array of size 1500000 i.e int array[1500000] but my compiler wont allow it. I remember seeing something about … Software Development c++ | |
Hello all: I would appreciate some advice on array subscripts. I am having problems passing 2-D arrays to functions I have written. The reason is that some of the arrays are dynamic arrays subscripted as array[i][j], whereas some of them were created in a class I wrote and these are … |
The End.