43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for christos312

Ok this is very strange and i cannot see where is the problem and i guess is really easy but i cannot see it so i will need your help :-O My Declarations [CODE]int myGraph[4][4]; int vertices[4]; char path[4];[/CODE] My initialize code [CODE]for(int i=0; i<=4;i++) { for(int z=0; z<=4; z++) …

Software Development c++
Member Avatar for christos312
0
154
Member Avatar for Akill10

Hi, I'm a bit stumped. I'm trying to find out a way to make a bullet fly from a spaceship. So far, I managed to make it work but it attaches onto the coord's of my ship image(I used the position of this to map the starting position of my …

Software Development image java
Member Avatar for JamesCherrill
0
346
Member Avatar for ajst

Hi guys, I'm trying to create a 2D array of JLabels my first problem is actually creating them. my code atm is = [CODE] package test; import java.io.File; import javax.swing.JLabel; import javax.swing.JPanel; public class testing extends javax.swing.JFrame { /** Creates new form testing */ public testing() { initComponents(); for(int i …

Software Development java java-swing
Member Avatar for ajst
0
1K
Member Avatar for gaurav_13191

I have the following code for Quick Sort procedure: [CODE] #include<stdio.h> void Quick_sort(int *arr,int left,int right); int Partition(int *arr,int left,int right,int pivotindex); int main() { int a[20],n,ctr=0,j=0; printf("\nEnter number of elements:"); scanf("%d",&n); printf("Enter array elements:"); while(ctr<n) { scanf("%d ",&a[ctr]); ctr++; } Quick_sort(a,0,n-1); printf("\nSorted Array:"); while(j<n) { printf("%d ",a[j]); j++; } …

Software Development c
Member Avatar for vinitmittal2008
0
149
Member Avatar for helpfullProgram

Hello everyone! I am programming a vector which stores a name and a number. [code] typedef pair<int,string> Users_Pair; vector<Users_Pair> Users_Name; [/code] And the vector expands and contracts through out the life of the program. But when I use erase all elements above the one being erased loose their string? I …

Software Development c++
Member Avatar for Narue
0
199
Member Avatar for shinsengumi

Hello all. Can anyone here help me create a separate function for the socket() API in socket programming? I successfully created one in Linux before but so far I can't do the same in Windows. The Windows version can't successfully connect using the separate socket() function. My primary suspect is …

Software Development c microsoft socket-programming
Member Avatar for shinsengumi
0
481
Member Avatar for IDC_Sharp

so, i want to save my listView Items as i save Location or Size of window in the Project settings. for example: [CODE] private void Form1_Load(object sender, EventArgs e) { this.Location = Properties.Settings.Default.MyLoc; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Properties.Settings.Default.MyLoc = this.Location; }[/CODE] how can i do that? …

Software Development listview
Member Avatar for Diamonddrake
0
1K
Member Avatar for gaurav_13191

Consider the error in following program- [CODE] #include<stdio.h> #include<conio.h> #define MAX 100 struct stacktype { int stack[MAX]; int top; } ; void push(struct stacktype * s,int item) { if(s->top==MAX-1) { printf("Overflow"); return; } s->top++; s->stack[s->top]=item; } int pop(struct stacktype *s) { int item; if(s->top==-1) { printf("UnderFlow"); return -1; } item=s->stack[s->top]; …

Software Development c
Member Avatar for gaurav_13191
0
183
Member Avatar for frank33

I am formally studying VB.NET and the teacher has temporarily left us with a textbook to study. In a chapter on Arrays an example of actual code is given, as shown at the bottom here. We use Microsoft Visual Basic 2008 Express edition for our code. However a simple Copy&Paste …

Software Development vb.net visual-basic
Member Avatar for kvprajapati
0
242
Member Avatar for networkZombie

...so I'm trying to make a program that takes in the three sides of a triangle and then decides whether the triangle is equilateral, isosceles or equilateral. I have to have 2 different functions and I can't use global variables ( That's what my teacher wants ). My main function …

Software Development c++
Member Avatar for Dingbats
0
273
Member Avatar for Steve Mac

Can somebody help me here? i have managed to import excel data into a datagridview but am having problems saving and updating it. It is saving alright but when it comes to updating that's when i have problems. here is my code: [code] If mysqldr.HasRows Then mysqldr.Close() newcommand = New …

Software Development vb.net
Member Avatar for Steve Mac
0
81
Member Avatar for elsiekins

Simmilar problem again using a vector of length 4 [CODE] vector <char> something; something += '1','2','3','4'; somefunction(something,4); [/CODE] some function takes in a [CODE]char* ptr, unsigned int size[/CODE] at the moment i am getting "error C2664: 'something' : cannot convert parameter 1 from 'char' to 'char *" any help would …

Software Development c++
Member Avatar for elsiekins
0
145
Member Avatar for Translucentbill

I have been working on a text based adventure game as a project for school. I have become very well acquainted with functions, loops, arrays, etc. I now have to begin thinking on a senior project utilizing something we worked with this year and I love to code but I …

Software Development c++
Member Avatar for SgtMe
0
329
Member Avatar for nore

Hello all, i want to know some textbox case. I want to make my textbox (example textbox1) only can be written by numeral, if there was non numeral input, textbox1 not allow or just being ignored. Thanks for attention or help :)

Software Development vb.net
Member Avatar for nore
0
350
Member Avatar for FutureWebDev

When testing the output of a variable of type double, with [B]expected results = 48.66573405[/B], I am getting an [B]actual result = 48.6657[/B]. Why is the expected result being rounded when the whole idea of using type double is to increase the precision of your calculations? Thanks FWD

Software Development c++
Member Avatar for FutureWebDev
0
188
Member Avatar for vedro-compota

Do I understand that by using the following code [CODE] a = getchar(); b = getchar();[/CODE] , after pressing "1" and "Enter" keys ( Enter - to continue programs work), we can derive the following variables - [CODE]a = '1'; b= '\n';[/CODE] thanks in advance))

Software Development c
Member Avatar for vedro-compota
0
98
Member Avatar for vadalaz

I'm supposed to define a function that removes all nodes with a specified value from a linked list. I have to use this structure: [CODE=c] typedef struct LIST { int Object; struct LIST *Next; } LIST; [/CODE] and here is the function I wrote [CODE=c]void LDeleteElem(LIST **List, int Elem) { …

Software Development c linked-list
Member Avatar for vadalaz
0
113
Member Avatar for Random_Integer

I know you can, [CODE]frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);[/CODE] but is there a way to get it to execute a method and then exit? example.. [CODE]frame.setDefaultCloseOperation(saveData, JFrame.EXIT_ON_CLOSE);[/CODE] just a guess? thanks all

Software Development java
Member Avatar for Random_Integer
0
123
Member Avatar for Akill10

Hi, I am pretty sure there is a more effective way of achieving this. Would love for some input from you guys. Basically, I have a class called GamePanel and it contains this: [CODE] SpaceShip spaceship = new SpaceShip("Galatar"); public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.drawImage(bgI,0,0,null); …

Software Development image java
Member Avatar for Akill10
0
178
Member Avatar for aria12

ok, below is the code that i have tried and still not working; #include <stdio.h> int main () { char Name; int Age; int Date_Of_Birth; float Place_Of_Birth; float Email_Address; printf ("Name:"); scanf ("%c",&Name); printf ("Age:\n"); scanf ("%d",&Age); printf ("Date Of Birth:\n"); scanf ("%d",&Date_Of_Birth); printf ("Place Of Birth:\n"); scanf ("%s",&Place_Of_Birth); printf …

Software Development c c# c++
Member Avatar for gerard4143
0
116
Member Avatar for muraj

/*1st - What I want to do is have the user input 2 numbers. Program should determine which is lowest and highest, then spit it out. Then I’m trying to have the user input a 3rd number that is equal to or in between the lowest number and highest number. …

Software Development java
Member Avatar for Akill10
0
140
Member Avatar for FutureWebDev

The program below is executing fine but when I enter the last of 10 numbers and the final output(shows the average of the 10 numbers) is displayed, I get the following error message: Run-Time Check Failure #2 - Stack around the variable 'numbers' was corrupted. If someone could explain what …

Software Development c++
Member Avatar for FutureWebDev
0
197
Member Avatar for vinitmittal2008

I am using CODEBLOCKS and I am creating a program that performs basic operations like add, delete and insert on Doubly LinkList , My Program is working fine on older Turboc compilers. But when i run it on codeblock its causing problem when i try to delete a node. [CODE] …

Software Development c
Member Avatar for vinitmittal2008
0
223
Member Avatar for jcb0806

Using VbScript:: I have a list of several different prices and I'm trying to figure out how to round these 5 decimals adding zeros if necessary. For example: I want 2.84 3.1 4.896 to look like 2.84000 3.10000 4.89600 Can somebody please help me? Thanks!

Software Development vb.net vbscript
Member Avatar for jcb0806
0
212
Member Avatar for alexchen
Member Avatar for alexchen
0
214
Member Avatar for bob24bob

So i've been working on this code that i got online and it is a chat server code. This is the code- [CODE]# import needed modules: from socket import * # get sockets, for well, sockets import string # string functions import time # for sleep(1) function # define global …

Software Development python
Member Avatar for bob24bob
0
806
Member Avatar for anilopo

A - an interface. B,C,D - implement A. in an other class, say X, i have an array of A, that will hold some B, C, D. i have a method that get (int i, A a) and put the a in the i place of the array. ->>>> how …

Software Development java
Member Avatar for anilopo
0
82
Member Avatar for abelingaw

Using Borland C++ 3.0 Here's my code: [CODE] #include<iostream.h> #include<conio.h> int main() { int m,d; int i=0; clrscr(); cout<<"\nEnter Birthday month: "; cin>>m; cout<<"\nEnter Birthday day: "; cin>>d; cout<<"\n"; { if(m==3 && d>=21) cout<<"ARIES!"; else if (m==4 && d<=20) cout<<"ARIES!"; else if(m==4 && d>=21) cout<<"TAURUS!"; else if(m==5 && d<=21) cout<<"TAURUS!"; …

Software Development c++
Member Avatar for abelingaw
0
604
Member Avatar for Nandomo

Ok I have a little problem.I have a pointer in the struct which I don't know how to use as or move the information into an array on the bottom function. Need an explanation. Anyone please help... [CODE] // This is the minimum functionality for this exercise // Notice that …

Software Development c++
Member Avatar for Fbody
0
217
Member Avatar for WildBamaBoy

I'm working on a scientific/algebraic calculator and I have put all of the code that will deal with any of the math in a separate class. However I cannot access any of the controls on the form from this class. I need to write the answer into the box on …

Software Development
Member Avatar for darkagn
0
140
Member Avatar for gutchi

Hi everyone! So here's my problem: Given an element, I need to get the index of the array in an array of arrays. For example, I have the following array of arrays: [CODE] my @arrOfArr = ( [ "1023", "1472", "0751651"], [ "1527", "1167", "2496111" ], [ "M167", "1412", "1761683" …

Software Development perl
Member Avatar for gutchi
0
220
Member Avatar for bleedi

EDIT: I found the solution already. I had to malloc() memory for rec_msg. :) Hi, I've got a little problem with my (unix) C program. I'm trying to make a HTTP request to fetch a page from a site. I can resolve the IP, make a socket, connect and send …

Software Development c unix
0
507
Member Avatar for dragonstear

Alright, so i got this question that im given a group of scores in the file, and i have to make them into a list, sort the list, and find the median. I got the sorting and the median done.. But I just got one problem that I can't seem …

Software Development python
Member Avatar for dragonstear
0
132
Member Avatar for tawes01

I want to have a live clock in the statusbar. When I put SetWindowText before the switch in the callback, like this: [CODE]BOOL CALLBACK MainDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam) { time_t rawtime; struct tm *timeinfo; time(&rawtime); timeinfo = localtime(&rawtime); strftime(thetimeis,79,"Current Date and Time: %A, %B %d, %Y …

Software Development c++
Member Avatar for xuancong
0
241
Member Avatar for jrp370

so i know how to add the numbers in a list recursively [CODE] def ListSum(list): if list = []: return 0 else: return list[0] + ListSum(list[1:]) [/CODE] but how would i go about subtracting a list from a list using recursion? does anyone know how/ where i could go to …

Software Development python
Member Avatar for TrustyTony
0
1K
Member Avatar for AntonyLini

Hello all, I am writing a WPF application and used pages for navigation, The thing I want to know is that , [B] [COLOR="Red"][COLOR="red"]How can I get the Relative Uri`s of pages from the assembly dynamically[/COLOR][/COLOR][/B]. I don`t know what to do with this. I know how to get a …

Software Development assembly
0
80
Member Avatar for seanbp

I was reading a post somewhere on this site about making a type-dynamic list and came up with this. The issue is I'm thinking it's leaking memory when the list grows. Finally, are there any ways to improve this code? [CODE]#include <iostream> using namespace std; class DynamicType { public: union …

Software Development c++
Member Avatar for seanbp
0
111
Member Avatar for Victoryy

Hi All, I have a crystal report with DrAmt, CrAmt, DrBankAmt, CrBankAmt fields. While displaying the report i want to display.. the records whose following condition satisfied... [B]((sum(DrAmt)+sum(CrAmt)) - (sum(DrBankAmt)+sum(CrBankAmt))) <> 0[/B] how can i check for this condition in selection formula.... I have used following line of code... but …

Software Development
0
66
Member Avatar for seanbp

Is this decent code, hacks, or somewhere in between? :)

Software Development java
Member Avatar for ProgrammerAl
0
99
Member Avatar for rgutierrez1014

Hi everyone, So I tried making my program here, and I got an error that I can't figure out. I have a class for a Binary Tree, "Stree", with a few methods defined publicly, and a "Node" class defined privately, within "Stree". These methods use "Nodes" as parameters. Now when …

Software Development c++
Member Avatar for rgutierrez1014
0
280
Member Avatar for PennyBoki

the errors are commented in the code: help??? [code]import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import java.lang.*; public class Kol2_1 extends Applet implements ActionListener { Button plus = new Button("+"); Button minus = new Button("-"); Button times = new Button("*"); Button div = new Button("/"); Button eq = new …

Software Development java java-swing
Member Avatar for cempaka123
-1
209
Member Avatar for ibdatx

Hi, I have a question regarding navigating to a listbox item in C#. I have written code which populates a listbox from an xml file in xaml (thus bound to it). However I want to navigate to the selected item in the listbox using code in c#. I can navigate …

Software Development asp.net c# xml
Member Avatar for ibdatx
0
283
Member Avatar for tendaimare

i have this function and it is giving me this warning. and i have many similar functions so by the time i'll be done i'll have a thousand warnings how can i get rid of the warnings Function 'SelectRows_local' doesn't return a value on all code paths. A null reference …

Software Development vb.net
Member Avatar for Unhnd_Exception
0
110
Member Avatar for BleepyE

Hi, I was just wondering if there was anyway to create some sort of stopwatch, that doesnt include labels signifing, milli seconds etc? Thanks

Software Development vb.net
Member Avatar for BleepyE
0
115
Member Avatar for Violet_82

hi guys, I am working on a project for my school, and I was wondering whether I can get some guidance and tips on how to tackle it. Here’s the problem in brief: I was asked to develop a program so that users can input the data values of 2 …

Software Development c++ gui
Member Avatar for Violet_82
0
91
Member Avatar for anqe_tb

Hi All, I've looked everywhere and cannot find a reason for this. I'm essentially try ing to loop through every row in a datagridview, and trying to remove the entire row, if a certain cell's value matches another value. Please find the code below. This is working, however is skipping …

Software Development vb.net
Member Avatar for anqe_tb
0
785
Member Avatar for benny2010

When you make sprites does the image file type have to be .png or can it be .jpeg etc.?? cheers for helping me out

Software Development c++ image
Member Avatar for alexchen
0
132
Member Avatar for brundlefly

Hi guys i wonder if someone can help an absolute noob out with some homework. i was given a brief of: ask a user to input up to 3 mobile numbers. for the numbers entered display the list of numbers entered and clearly displays the mobile network each number belongs …

Software Development python
Member Avatar for brundlefly
0
110
Member Avatar for ajst

Hi Guys, I'm basicly reading from a CSV File that im using to store data. Now when I read from the CSV file i want to load the data to fill in the parameters eg. the csv file contains name,address,age,favColor. so when i load the file i want it to …

Software Development file-system java
Member Avatar for jon.kiparsky
0
139
Member Avatar for MasterGberry

I am having an issue using this new operator function that I learned. The program thinks that I am calling the operator=() instead of the operator+() so it is hitting an infinite loop. I marked the areas where there are issues, and i commented some of the newer things that …

Software Development c++ os-x
Member Avatar for MasterGberry
0
147

The End.