64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for DavidDD

Hello there! I am pretty new to game developing but got a book and a library called CDX. The first chapter is about creating Pong as it is a very simple game. But I would like to make it a bit more complicated than just negating the X and Y …

Member Avatar for 0x69
0
85
Member Avatar for JimD C++ Newb

Hello, all! I have a (hopefully) quick question: I have an array of 128 ASCII characters called blockData[] that I am trying to convert into a string. [code] for (int i = 0; i < 128; i++){ blockStuff = inFile.read(); blockData[i] = blockStuff; if (blockData[i] != 0){ String aChar = …

Member Avatar for JimD C++ Newb
0
132
Member Avatar for leeZA1

Hi i have a user form, one part is a textarea where the user tpes in information. If they just enters spaces rather than text, i want a error to appear and not accept it, what code do i need??

Member Avatar for colweb
0
76
Member Avatar for rena0514

i have to creat a program that verifes a valid user id before printing out the new email address. here are my errors: [CODE]c:\users\rena0514\documents\visual studio 2005\projects\user_id\user_id\verification.cpp(50) : error C2664: 'strncpy' : cannot convert parameter 2 from 'std::string' to 'const char *' 1> No user-defined-conversion operator available that can perform this …

Member Avatar for Salem
0
186
Member Avatar for tquiva

Can someone please help me with this program? My goal is to create a test driver for the function put_result(). The program compiles and works as intended. However, I came across a bug that I am having an extremely difficult time trying to fix. I tested for several inputs and …

Member Avatar for tquiva
1
227
Member Avatar for ShortYute

[CODE]char **makeString ( const int numOfArrays, const int sizeOfEachArray ) { /* Function to create an array of strings: ( Array of pointers to strings ) */ /* Local variables */ int i, j; //int numOfArrays = 6; /*char stringsToCopy[6][12] = {"Hello", "Good-Bye!", "Greetings", "Pointers", "Arrays", "Programming"}; */ char **stringArray …

Member Avatar for ShortYute
0
160
Member Avatar for popcorn99

I wrote a simple echo program, which reads standard input character-by-character and then prints it to standard output character-by-character. [code] #include <stdio.h> int main() { int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } [/code] I was expecting it to break out of the while …

Member Avatar for jephthah
0
142
Member Avatar for ncwolfe

Here's the program I wrote not using a procedure: [CODE] .data target BYTE "aabccdeef", 0 freqTable BYTE 256 DUP(0) space BYTE " ", 0 .code main PROC mov edi, OFFSET target mov esi, OFFSET freqTable mov ecx, LENGTHOF target mov eax, 0 L1: mov al, [edi] movzx eax, al mov …

Member Avatar for ncwolfe
0
441
Member Avatar for tedsu

I am trying to print out the number of occurences for each alphabetic chracter in a file that our instructor provided us with. The values range from 1 to 999. I'm trying to print out "count[...] : " followed by the character. So far my counts are correct. However, at …

Member Avatar for Banfa
0
243
Member Avatar for Griff0527

I just started this program a few hours ago, and I am running into an error that I do not understand. I tried finding an answer on Google as well. First off, this is the bare bones of a code right now. I have not started any of the sub-functions …

Member Avatar for Griff0527
0
141
Member Avatar for DaveTran

I've written a little method that returns the index of the maximum of 3 numbers (0, 1 or 2): [CODE] public static int Max3Index(float val1, float val2, float val3) { int index = val1 > val2 ? 0 : 1; if (index == 0) { index = val1 > val3 …

Member Avatar for apegram
0
129
Member Avatar for NewVBguy

Hi There, i am using the shell function to execute a program that will zip 10 big data files. so my code is something like this: for n = 1 to 10 t=shell(zip data(n)) 'not the real code ' somewhere here, i need a code to test if the data(n) …

Member Avatar for RodneyKocot
0
173
Member Avatar for bgx90

I cannot figure this out. Can anyone see what is causing the problem? This is the error I get when I try to compile with the GNU compiler: sortQS.h: In function âvoid sort(UList<U>&) [with U = int]â: test.cpp:13: instantiated from here sortQS.h:16: error: ârecQSâ was not declared in this scope …

Member Avatar for Banfa
0
164
Member Avatar for Derp2000
Member Avatar for mattbaehr

I am using a script from Dynamic Drive and have posted this on their forum as well, with no luck. The script looks great in every browser but IE. When you hover over the parent page and the child pages show up, they go away when you start to scroll …

0
71
Member Avatar for khnkng

hi i m mateen frm india i have a problem with my java compiler i want to know how to set the path of compiler and how to execute the program i have already installed the java software someone answer to my question and help me out

Member Avatar for peter_budo
0
137
Member Avatar for ceyesuma

Hello I am trying to use a MySQL database and connect to it using a Desktop App. I need to have it embedded and I am using netbeans and I am connected to the database I am also in the admin console for glassfish. I tried setting it up once …

Member Avatar for ceyesuma
0
92
Member Avatar for spaniel

Hi, I'm trying to do something pretty straightforward (I think) but it's not working for me for some reason. Basically trying to create an object with an ArrayList as a attribute but i keep getting numerous errors saying '<identifier> expected', '; expected'. My code is as follows: [CODE]import java.util.ArrayList; public …

Member Avatar for spaniel
0
119
Member Avatar for sana zafar

Hi all, Im having a little trouble. I have to write a program that will input a string of positive integers terminated by a negative integer and then sort it.I have done the sorting part and it works fine.But the part that the string continues to get integers unless a …

Member Avatar for sana zafar
0
98
Member Avatar for star_lavender

hi...I'm trying to calculate the total no of item of things in a table, so I select the same item first, then I start adding them and save the total no of items in another table...but the problem is when I start insert the new items, the existing items also …

Member Avatar for star_lavender
0
106
Member Avatar for ITGuy2010

Hello, If I wanted to pass the two arrays below into a function and multiply them and return the two dimensional array how would I go about doing that? If anyone can give me an example I'll go with that. Thanks! [CODE]Public Class frmTotalDailySales Dim ItemCost() As Decimal = {12D, …

0
56
Member Avatar for Stefano Mtangoo

I have this question and might look stupid indeed, but bear with me. I have files in this hierrachy ProjectFolder/Panel/panel.h ProjectFolder/Panel/panel.cpp [B]AND[/B] projectFolder/Search/search.h projectFolder/Search/search.cpp I want to include search.h in panel.h I have tried many thing including [CODE=C++]#include "./search/search.h" #include "../search/search.h"[/CODE] but I have failed. Any suggestion on how to …

Member Avatar for Stefano Mtangoo
0
68
Member Avatar for Bagleys

Hi im trying to run "ipconfig /all" in vb this is the code i have but the window closes down after it has completed the command is there away to keep the window active until the user wants to close it? [CODE]Dim Command As String Command = "ipconfig /all" Shell("cmd …

Member Avatar for Bagleys
0
145
Member Avatar for farsen

Hi. I have this kind of common problem, but cant find a solution for it after many google searches. What i want is this: [CODE] ArrayList items = new ArrayList(); items.add(item1); //the item object contains several properties items.add(item2); items.add(item3); foreach (item i in items) { Create and edit a new …

Member Avatar for Venjense
0
198
Member Avatar for Griff0527

Ok, I have read several other questions basically asking the same thing, but I know this code can work instead of using other peoples work. Yes, i'm stubborn. I have written a function to be called from my main program and i keep getting an error that I cannot figure …

Member Avatar for jephthah
0
775
Member Avatar for nunos

I need help with debugging this piece of code. I know the problem is in malloc and free but can't find exactly where, why and how to fix it. Thanks. [CODE] #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> #include <string.h> #include <sys/wait.h> #include <sys/types.h> #define MAX_COMMAND_LENGTH 256 #define MAX_ARGS_NUMBER …

Member Avatar for nunos
0
174
Member Avatar for YenkoSC

I have code here for a form that submits the data to my email. When I click the send this form button, it submits the email to my address with the titles that I want but not the data that has been put in the boxes. Furthermore, I want to …

Member Avatar for JRM
0
99
Member Avatar for SMHouston

Ok, I'm new to php and MYSQL aswell. I have a couple programs actually that are getting this error and I don't see what could be causing this at all. Here's the situation. I have a job interview page. The user enters the information from the candidate and submits the …

Member Avatar for SMHouston
0
4K
Member Avatar for nschessnerd

Hi, I have a query: [CODE=sql]SELECT h.id, h.creator uid, h.haiku, h.title, h.likes, h.approved, cat.name category, count(c.id) comms, h.anonymous, CASE h.anonymous WHEN 1 THEN 'Anonymous' ELSE u.username END username FROM haiku h left join categories cat on cat.id= h.category left join comments c on c.haiku=h.id left join users u on u.id=h.creator …

Member Avatar for nschessnerd
0
74
Member Avatar for Sseeth

Ok heres the problem Im working on a final project for a java course and one thing is blocking my path. import java.util.*; public class Controller { public List<CrewMember> list = new ArrayList<CrewMember>(); public void addItem() { CrewMember cm = Academy.load( MenuUtil.getAString("Enter the role: "), MenuUtil.getAnInt("Enter the id number: ")); …

Member Avatar for Sseeth
0
4K
Member Avatar for leeZA1

The code below is what i am using to upload a photo to store it in a database, is it being stored correctly?? as it will not let me view them properly, any help is great!!! [code] $title = $_POST["title"]; $userfile = $_FILES['userfile']['tmp_name']; $userfile_name = $_FILES['userfile']['name']; $userfile_size = $_FILES['userfile']['size']; $userfile_type …

Member Avatar for diafol
0
140
Member Avatar for Tabone3

Hi, I'm a bit new to java and I would like to make a program that save's and load the saved data that the user had inputted in my java program. For example I done a sort of a Bank System and when I close my program and restart it …

Member Avatar for Tabone3
0
186
Member Avatar for invictuspravin

Hello There, Access denied for user 'xxxx.d'@'xxxxx' (using password: YES) Actually in my application i am executing stored procedure on page load of index page ... i have hosted application on webserver and i am using shared mysql database server when i triese to run the page it shows the …

Member Avatar for invictuspravin
0
153
Member Avatar for lowhzplayinfool

I havn't been able to find anything on the web which actually applies to what i'm trying to do yet. I have form1 which has 2 methods. These methods are the same but two versions, one with 3 variables in its parameter (?), one with 4. It is necessary for …

Member Avatar for lowhzplayinfool
0
143
Member Avatar for leeZA1

If anyone has ideas pleas help!! Ok, i have a drop down box generated from my database, the user can pick a option and then delete it from the database althoguh i doesnt seem to reogise it if it has a space in the word. How can i prevent this? …

Member Avatar for leeZA1
0
100
Member Avatar for ku95

Hi basically I'm current doing a connect 4 program that consist of 3 separate programs Connect4Model, Connect 4 Column and Connect4View... I'm trying to compile and run my connect4View program but for some what reason I'm unable to do so. Below I have supplied the code for the 3 programs. …

Member Avatar for peter_budo
0
210
Member Avatar for moni94

Hi. I made this program to capture the current screen in C#. In Visual Studio 2008, it worked perfectly, but now with VS 2010, I get the following exception: ExternalException - a generic error occured in GDI+ on the line where I save the bitmap: bmp.Save("screen.jpg"); I have looked everywhere …

Member Avatar for kvprajapati
0
117
Member Avatar for lwschjang

Basically, I am having trouble figuring out how to work my if statements. The only one that works is the final statement and that is due to it not having the [CODE]if("#".equals(e.getActionCommand()))[/CODE] statement. So, how should I go about allowing the user to select the quantity in the combobox and …

Member Avatar for lwschjang
0
153
Member Avatar for sitieda

hi helper.. i tried search many time to search this but still dont have the answer here is my code.. [COLOR="Green"]textBox11.Text = Convert.ToString(textBox3.Text) - Convert.ToString(textBox4.Text); [/COLOR] and it error : Operator '-' [COLOR="Red"]cannot be applied to operands of type 'string' and 'string' [/COLOR] please help me..im new in programming

Member Avatar for sitieda
0
129
Member Avatar for pinsickle

Hello, I'm working on a problem (Huffman Tree encoding/decoding) and I need to covert and Int to a char. I was trying to use [CODE] char temp = static_cast <char> (index); //index is an integer [/CODE] it compiles but if I try to print, it crashes so obviously that idea …

Member Avatar for jonsca
0
269
Member Avatar for andrew732

I'm not sure exactly what I'm looking for or whether it exists, but I was hoping to get any ideas from the assembly experts here. I do know basic x86 and ARM assembly from classes but have not used them much in "real life." Ideally, what I would like is …

Member Avatar for andrew732
0
437
Member Avatar for bgx90

I am trying to place a friend function of a template class named sort in its own header file. I keep getting errors when compiling my test program. I have tried different things to fix it, but nothing works. My experience with template classes is limited as is my knowledge …

Member Avatar for bgx90
0
237
Member Avatar for JordanWalcaraz

Hi everyone, I know this is a very beginner inquiry, but I can't seem to figure out exactly what it is that I'm doing wrong. I'm using this tutorial: [url]http://www.sthurlow.com/python/lesson05/[/url] to build a simple calculator program. My version of Python is 3.1.2 here is my code: [code] loop = 1 …

Member Avatar for hondros
0
142
Member Avatar for ITGuy2010

Hello, I am trying a better way to write what I have coded below, the idea is I have a one dimensional array with set values and a rectangular array that gets the number of items entered each into a text box. 1. Is there a simpler way to get …

0
45
Member Avatar for Gé48

When entering a value in dgv I want the Tab key to fire a routine. Works out ok only thing is I have to hit the Tab twice before it fires. Don't know why, is there a way to prevent it, so that I have to hit the Tab key …

Member Avatar for Gé48
0
100
Member Avatar for gnarlyskim

Having issues with this program. I've been trying to identify all the areas where data is created, then tried to destroy it likewise after using it. I've put a lot of delete[] coef (coef is a pointer double array to hold coefficients). The program will run half the time, then …

Member Avatar for gnarlyskim
0
130
Member Avatar for bjeffries

I currently have some code to show the latest update on my site. I have two problems: 1) how do I get the date to Display "04-13-10". I know the php code is date("m-d-y") But how would I incorporate that for an updated item? 2) limit the number of updates …

Member Avatar for genevish
0
107
Member Avatar for cool_jatish

hi........ can anyone tell me the connection strings to connect JAVA JAPPLET to sql server 2005 database and also the execution of SQL statement in java thanks

Member Avatar for Ezzaral
0
126
Member Avatar for ereruh

Hey. I'm making a Hangman and I have this code to retrieve a random word from a txt file: [CODE] private void ord() { Random random = new Random(); StreamReader read = new StreamReader("sweord.txt"); ArrayList lines = new ArrayList(); string line; while ((line = read.ReadLine()) != null) lines.Add(line); read.Close(); int …

Member Avatar for ereruh
0
161
Member Avatar for FancyShoes

Hi I am trying to return a boolean value into another method, but it's not working. [CODE] public static boolean ItemFound(boolean item, String desc1, String desc2, JTextArea txt){ if(item == true) txt.setText(desc1); if(item == false){ txt.setText(desc2); item = true; } return item; }[/CODE] and inside the other method I have …

Member Avatar for FancyShoes
0
156

The End.