132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Colin Mac

I have this C program with multiple files and I want to introduce a new file called enemy.c. and I'm wondering if I'm going about this right. game.h [code] #ifndef GAME_ #define GAME_ extern void game (void); extern void enemyFunc (void); extern int enemyPosX; #endif [/code] main.c [code]int main (void) …

Software Development c
Member Avatar for virgoptrex
0
184
Member Avatar for kayba

[code]import java.util.Calendar; import java.util.Scanner; public class Main { public static void main(String[] args) { int userBirthDay = 0; int userBirthMonth =0; int userBirthYear=0; Scanner input = new Scanner(System.in); System.out.println("Enter The day of your birth"); userBirthDay = input.nextInt(); System.out.println("Enter The month of your birth"); userBirthMonth = input.nextInt(); System.out.println("Enter The year of …

Software Development java
Member Avatar for kayba
0
125
Member Avatar for ccaatty

This is just out of curiosity! Does anyone know what is the maximum number of characters that a line of code can have? EDIT: Added more details. Is it possibly possible to make two lines become one? .... This seems pretty odd, I dont know how to explain it, but …

Software Development c++ legal
Member Avatar for cassandy
0
105
Member Avatar for valter

Hi, This has been driving me crazy so I hope someone can assist. I have a project with several custom dlls being referenced. I have found that although I add changes to my dll and rebuild etc, the program uses the old version. When I look at add reference there …

Software Development
Member Avatar for jcao219
0
96
Member Avatar for bohongtw

hi there i have an assignment about writing Cshell with some features i m not gonna ask plz gimme the codes or smth. but i need some advice how to start writing it, what to do maybe smn can show me ways to do it , thanks for help here …

Software Development shell-scripting unix
Member Avatar for Aia
0
174
Member Avatar for emilyhedgecock

Hi I am making an mp3 database at the moment and i have run into some difficulty when passing down the array to a function. I can do it when i create the array globally as obviously this means i dont have to pass it down, but i want to …

Software Development c
Member Avatar for Banfa
0
1K
Member Avatar for som3aman

Hey guys, Im trying to make a program that guesses the name of an animal in the users head by asking him or her a bunch of questions. The questions, answers, and line number for yes/no are inlcuded in the file animals.txt as follows: Q Does it have feathers? 2 …

Software Development c++ open-source
Member Avatar for Lerner
0
2K
Member Avatar for Bobon

Hey lads, I have a small problem re inheritance. The 1st piece of code is the superclass which contains hour and minute. The 2nd piece of code which is the subclass, contains the int second. The 2nd piece inherits the code from the 1st piece. Now when seconds go over …

Software Development java
Member Avatar for Bobon
0
74
Member Avatar for cpp.coder

[CODE]# include <stdio.h> int abc(int & x) { return x; } int main() { int y = 0; abc (y++); // error here return 0; }[/CODE] error is error C2664: 'abc' : cannot convert parameter 1 from 'int' to 'int &' But if i call the same function as abc …

Software Development c++
Member Avatar for cpp.coder
0
200
Member Avatar for the_preface

I have two problems with my code. One being I can't get it to repeat the simple game until the user has no money in his or her bankroll, the game continues even when the bankroll equals 0. The other is I can't get my program to repeat asking the …

Software Development java
Member Avatar for emilo35
0
185
Member Avatar for musthafa.aj

hi! i developing chat application ... my client and server communicate at lan but over internet it is not... i came to know that port forwarding for client and server communicate behind router... but Skype is working without any port forwarding.. how can achieve my chat application working like skype …

Software Development client-server java
Member Avatar for musthafa.aj
0
188
Member Avatar for JellyTurf

i need a simple way to slow down a for loop using a simple timer-like method. i know for a fact that there is one, because i used it in high school, i just can't remember the code.

Software Development java
Member Avatar for JellyTurf
0
112
Member Avatar for mrk_chiz

I have a table in a database named "tblstudentnumber" it has the following columns: stud_id stud_fname stud_lname stud_address stud_age stud_course i need to have a data report using data environment that can sort all students with the age(a user input) of let say "16". i have a form, it has …

Software Development visual-basic
Member Avatar for abu taher
0
203
Member Avatar for Taimoor Rana

hello guys, i have this code written down to print a magic square and i get an error. public void doMagic() { int k = 1; int row = 0; int col = order/2; msArray[row][col] = k; for ( int r = 0; r < msArray.length; r++) { for ( …

Software Development java
Member Avatar for litchi
0
163
Member Avatar for musikluver4

[code] import java.io.*; public class SortDoubleArray { public static void main(String[] args) throws IOException { double[] doubleValue = new double[10]; Input(doubleValue); ascendingSort(doubleValue, doubleValue.length); descendingSort(doubleValue, doubleValue.length); } public static void Input(double[] array) throws IOException { BufferedReader dataIn = new BufferedReader (new InputStreamReader(System.in)); String[] numbers = {"first", "second", "third", "fourth", "fifth", "sixth", …

Software Development java
Member Avatar for litchi
0
224
Member Avatar for danish_k12

Hi, I m making a software which calculates the hours worked by each employee per day. This is calculated by the in time and out time of the employee. I have the database which contains the in time n outtime of the employee in sql. Now, My problem is i …

Software Development visual-basic
Member Avatar for kinwang2009
0
202
Member Avatar for Jackgrt

Will vb run an old gwbasic .bas program? My problem is to lprint to a usb printer, and if I have to learn vb, so be it. thanx Jack

Software Development printer visual-basic
Member Avatar for kinwang2009
0
235
Member Avatar for claudiu_is

Hi, I need to develop a functionality similar with the iTunes one, when you right-click a song -> Get Artwork, the jpg/png is "embeded" into the mp3 file. I have no ideea how this could be done, do you have any hints ? Thanks.

Software Development image java
Member Avatar for jwenting
0
181
Member Avatar for asmhelp

Hello, I'm having a problem trying to trying to store a local variable in my asm program. I push 3 parameters: nbrElts (number of elements in the array), nbrArray (the address of the array), and result1 (the average). I'm trying to divide by the number of elements that I push …

Software Development assembly storage
Member Avatar for asmhelp
0
169
Member Avatar for Galf

Hi guys, Design question: I have a class that contains 2 vectors, and I'd like for that class to provide a public interface to access the next element in either list. The easy way to do it is to obviously return the list itself, either const or not, but this …

Software Development c++ storage
Member Avatar for Galf
0
106
Member Avatar for catcit

Hello! I am in the 11th grade and I have started with one of my colleagues to work on a file compression program based on Huffman coding. I have previously worked with python (a program that handles some .xls files) but this project is more complicated so I shall need …

Software Development file-system gui oop python
Member Avatar for jcao219
0
150
Member Avatar for jallan2010

Sir, My problem with my project so please help me about I am enclosing my project with problem very simple but I can't found. I am using text box and listbox last two textbox i.e. txtlani and maskedtextbox. Now the problem is when the user put the data into above …

Software Development vb.net
Member Avatar for jallan2010
0
122
Member Avatar for charlieruns

Alright. So this is just one part of my multiple part project. I need to try and get the frequency of how many times each word of 'X' amount of letters shows up. I am pretty bad at using arrays, but I realize this is the best way to do …

Software Development java
Member Avatar for rue64ja
0
125
Member Avatar for skorm909

ok so if i have somthing like [CODE]#include <iostream> using namespace std; int main(){ int action; cout << "have this show up first" << endl; cout << "then have an if statement here" << endl; cin >> action; if (action == 1){ cout << "then have this show up but …

Software Development c++
Member Avatar for WaltP
0
173
Member Avatar for swish123

Hello, I have new to programming in python(have a little experience in C++) and to this forum. I am trying to write a program that finds Nth prime number; for example the 1000th prime number. Whenever, I try to run the program I just a see a blinking cursor and …

Software Development python
Member Avatar for woooee
0
150
Member Avatar for the_preface

I'm relatively new to Java and I'm writing a code that implements a simple "Hi-Lo" game using a standard deck of 52 playing cards. I could give you the entire description of the program's requirements, but I won't let you all suffer the same headache I do. :P Anyhow, here's …

Software Development java
Member Avatar for kvass
0
167
Member Avatar for en12ic0

Hi, I'm trying to create a simple distributed system model in C where a central controller regulates the communication between several machines. The controller's job is firstly spawning client process in several hosts. In my understanding to do this you needs to have a connection with the target host but …

Software Development c socket-programming
Member Avatar for jephthah
0
87
Member Avatar for kendaop

Can someone please help me? I'm getting an exception: Given final block not properly padded. I can't figure out what I'm doing wrong. Shouldn't Java automatically pad the data for me? [CODE] import java.security.*; import java.io.*; import javax.crypto.*; public class AES { static String fileName = "javaEncrypted.dat"; static File inputFile …

Software Development java perl
Member Avatar for kendaop
0
359
Member Avatar for ChrisXxX

Can anyone shoe me an example code to encode an entered password in C. for example: password=vista when displayed to the user on screen when entering the password it should look like this ***** Can someone show me how this can be done, thanks

Software Development c
Member Avatar for jephthah
0
69
Member Avatar for miss_kruse

I'm having some trouble finding a place to put this question, since I don't have any insight in coding. Please let me know if the thread is misplaced, and I'll move it. Question: I have an idea of an app for iPhone/any smart phone and before I move on with …

Software Development c++ iphone
Member Avatar for Talguy
0
116
Member Avatar for cowboyz209

hey i need help with writing a program where it lets a maker of chips and salsa keep track of sales...i have this so far but dont know what else to do. [CODE]# include <iostream> # include <iomanip> using namespace std; int getTotal (int [], int); int posOfLargest (int [], …

Software Development c++
Member Avatar for WaltP
0
154
Member Avatar for blind122

My code converts roman numerals to the number values but i dont know how to make it do deciamls too, like for example: XX-X. I need it to recognize the "-" and start the loop again. How do i do that? Here is the code: [CODE]#include <iostream> #include <string> using …

Software Development c++
Member Avatar for WaltP
0
312
Member Avatar for Annettest

Hello everyone: I am a C++ newbie. I have used Matlab to fill the rows or columns of a matrix with values from a vector and I'm wondering how to do the same thing in C++... I have written code that puts new values in a vector. This happens in …

Software Development c++ matrix-multiplication
Member Avatar for Lerner
0
276
Member Avatar for koushikha

Hi, I am doing a project in vb.net. I have a text box which contains numbers separated with commas. Now I need to insert only those numbers in a database. How to do this?? Can anyone please help me out.? Please post your suggestions ASAP. Thanks in Advance

Software Development vb.net
Member Avatar for koushikha
0
47
Member Avatar for MonteM

Hello Every one, I am having trouble finding my correct condition to not run off the end of my file. So i am reading from a file and then tokenizing my data accordingly. My file has 16 lines and using my size function i get 18 lines instead since i …

Software Development c++ file-system
Member Avatar for Fbody
0
140
Member Avatar for MTW1989

[CODE]include <cstdlib> #include <iostream> #include <iomanip> #include <stdlib.h> using namespace std; void printintromessage (); void getUserInput (char& Y); int main(int argc, char *argv[]) { const int numofgamesinseries = 3; const int numofplayersonteam = 4; int i, score[numofgamesinseries]; int j, players[numofplayersonteam]; char Y = Y; printintromessage (); getUserInput (Y); do { …

Software Development c++
Member Avatar for MyrtleTurtle
0
262
Member Avatar for Jean88

I have been having various issues trying to figure out a very trivial problem. I've re-written this code now several times and used many different condition statements etc... One issue that i'm having right now is the input for the variable "paragraph" not being available, the paragraph input is skipped …

Software Development c++
Member Avatar for Jean88
0
583
Member Avatar for Krzysztow

Hello everyone, I have a problem and almost found a solution, for example this: [url]http://www.parashift.com/c++-faq-lite/multiple-inheritance.html[/url]. However in my case I cannot solve it in a proposed way and will explain it shortly why... So basically, I have a BaseView, that derives from QWidget like this: [code=c] class BaseView: public QWidget …

Software Development c++
Member Avatar for Krzysztow
0
86
Member Avatar for samanamuo

hi everybody, i would like to know how to computes and returns d2 – d1 d2 is passed to the function by reference and d1 is the implied calling object; date d1 is earlier than date d2 the function returns the difference between two date objects in terms of number …

Software Development c++
Member Avatar for Banfa
0
392
Member Avatar for red_lynx

Hi all, i am not an experienced Java GUI programmer and its the first time i'm asking for help in programming on a forum. I have this simple GUI which allows people to mark text with different categories. I use JTextPane and DefaultStyledDocument. Basically, i took most of the code …

Software Development gui java java-swing pc-peripheral
Member Avatar for red_lynx
0
163
Member Avatar for Pynolathgeen

I'm programming my own game at the moment, its connecting to a server and the server sends some spawn info and eventual other players who are connected. When a player moves, and an other player is also connected, the client of Player2 crashes. I don't know what is causing this, …

Software Development c++ client-server
Member Avatar for Pynolathgeen
0
115
Member Avatar for tazko

Hi , my program connect to old machine , the program received data but with many symbols and unnecessary characters any suggestion thanks this pic is the differnce between old program (VB) that receive with arranged characters : [IMG]http://i42.tinypic.com/2z9ch1d.jpg[/IMG]

Software Development
Member Avatar for tazko
0
97
Member Avatar for C_WHAT_I_DID

How do I make system calls in Java? I could do it in C but I'm not sure how to do it in Java. Thanks!!

Software Development java
Member Avatar for C_WHAT_I_DID
0
91
Member Avatar for mjacqu3

I'm new to Assembly and trying to write a program that requires a simple graphic display: a 10x10 grid of "|##|" . I need to make changes to it and redisplay it every so often. I can get it to display perfectly once but the second time I call the …

Software Development assembly
Member Avatar for mjacqu3
0
135
Member Avatar for dondajr

Hi guy, i have this little program: [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <unistd.h> //Obtem o nome do buffer de trade baseado na hora char *btfile() { char *fname; fname = malloc(14); time_t t = time(NULL); struct tm *lt; lt = localtime(&t); strftime(fname, 14, "%m%d%H%M.tbf", lt); …

Software Development c motherboards-cpu-ram
Member Avatar for dondajr
0
147
Member Avatar for VilePlecenta

Example: [CODE] class foo { public: void DoNothing() { cfee.AddNothing(); } }; class fee { public: void AddNothing() { int a = 0; a += 1; } }cfee;[/CODE] Is there a way to call a function in a instance of a class that was declared after the creation of the …

Software Development c++
Member Avatar for VilePlecenta
0
150
Member Avatar for SasseMan

Hi, I have really weird layout problem. I have a class VerticalGridPanel, which uses GridBagLayout to place components top to bottom, left to right, nothing special. Then I have a List of components, which i want to add a part of to a VerticalGridPanel. I then want to add another …

Software Development java
Member Avatar for SasseMan
0
291
Member Avatar for Valdemar009

Hi Everyone, I'm really fed up of working on C in Windows Vista. First and foremost, the window of C occupies only half the screen which is very annoying. I've heard that there is a distinct C that is used with Vista but I have failed to attain any more …

Software Development c c# c++ windows-vista
Member Avatar for jephthah
0
162
Member Avatar for lrolsto1

I habitually compile after every change I make, i had all of 5 minutes to start a project and this will not compile!!: [CODE] public class Battleship{ public static void main(String[] args){ int boardInput = parseInt(args[0]); } }[/CODE] I get this error: Battleship.java:19: cannot find symbol symbol : method parseInt(java.lang.String) …

Software Development java
Member Avatar for lrolsto1
0
123
Member Avatar for DanielaCrisan

[code] private void button1_Click(object sender, EventArgs e) { n = Convert.ToInt32(textBox1.Text); for (; i < n; i = i + 2) { textBox2.Text = textBox2.Text + " " + Convert.ToString(i); ; } } [/code] I an mentioning that i,n=0; is located in the declarations zone of InitializeComponent(); I get the …

Software Development c c# c++
Member Avatar for Diamonddrake
0
151

The End.