132,726 Archived Topics
Remove Filter ![]() | |
Don't know if this is the right place to post this but... I just started with SDL, and get the error: expected constructor, destructor, or type conversion before '*' token With this code: [CODE]#pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #include "C:\Documents and Settings\Mikael\Mina dokument\SDL\SDL-1.2.14\include\SDL\SDL.h" #include <cstdlib> #include <iostream> #include <string> … Software Development c++ | |
Write an if/else statement that compares the value of the variables soldYesterday and soldToday , and based upon that comparison assigns salesTrend the value -1 ( soldYesterday greater than soldToday ) or 1 . i wrote: [code] if (soldYesterday > soldToday) { salesTrend = -1||0; } [/code] and its coming … Software Development c | |
Hello, I need help with re-ordering the values in ascending order in the array (Unordered). However, I cannot use swap or sort function (i.e. Bubblesort). How can I do that? Software Development c | |
I'm currently trying to create a client program that sends location variables (x and y) to a server, which then passes it on to another client and vice versa so when one client moves the object, the other client see's the change immediately on screen. I think get and set … Software Development client-server java | |
[code] #include <iostream> #include <iomanip> { void DispalyStoreItems (); int ChoosingItems (); double calculateChange ( int , int ); { int cost; DispalyStoreItems (); cost = ChoosingItems (); calculateChange ( int pay , int cost ); system ("PAUSE"); return 0; void DispalyStoreItems () { std::cout <<"Code" << setw (10) << … Software Development c++ | |
I need to grep a line from a text file, and delete the fourth and fifth field. then save it back to the text file. If that wont work I could also grep the line, and delete the first number and everything after it on that line. Both would accomplish … Software Development shell-scripting | |
i got a project that uses TooN and cvd libaries. i got the TooN and cvd source and headers files (downloaded from their sites) but i dont know how to add them to my project. i think i should make lib files and than add them to the project, but … Software Development c++ | |
Hello fellow python programmers. I had an idea the other night when watching a video on the creation of the Tasque application. Developers at novel are given a week called "Hack week" were they have no management and are allowed to code anything they like. Well two of the developers … Software Development open-source python | |
Hi, I have a sentences like this: I have words like this: Example 1: [code] $string="control"; @arr= qw(Our data suggests that shape and growth control are unequally affected,The growth of tissue is control,The observed regulation is due to elevated levels in the blood,The sugar levels are in control and there … Software Development perl | |
First here is what I need to accomplish: --------------------------------------------- The program In this program you will create a direct access file on a simulated disk. A number of sectors will be allocated for the file and records will be written to the sectors using hashing. The sectors will be buckets, … Software Development java | |
My code outputs the correct answer to both the GUI and to a text file, but it displays it in a list format instead of a clean looking table. What modifications have to be made to assign formatting of output correctly? [CODE]import javax.swing.*; import javax.swing.border.*; import java.awt.*; import java.awt.GridLayout; import … Software Development file-stream gui java java-swing | |
The program calls for: Here is what the program calls for: Write a program that lets a maker of chips and salsa keep track of their sales for 5 different types of salsa they produce: mild, medium, sweet, hot, and zesty. It should use two parallel 5-element arrays: an array … Software Development c++ | |
Any ideas on how would I be able to traverse this BTree in asceding order? right now I am sorting the data and giving it to my retreival() function to look for the keys. But naturally it visits and prints the data in ascending order because I give it sorted … Software Development algorithm c++ ios open-source | |
[B]For school, using Visual Basic 9.0 (2008)[/B] Write a program called Histogram that reads data from a file (allow the user to input the file name) and produces a horizontal histogram. The first line of the file should contain he title of the histogram, and each subsequent line should contain … Software Development vb.net visual-basic | |
Hello frnds, I have created a b'day reminder application in VB 6. I want to that application will remind us every two hours in small icon like when small pop window. and i also want that my login form should be displayed at that tima when system booting complete. can … Software Development visual-basic | |
How can I SWITCH the contents of 2 textboxes by clicking on a command button? I tried to solve it this way : [CODE]Private Sub Command1_Click() Text1.Text = Text2.Text Text2.Text = Text1.Text End Sub [/CODE] But it didn't work out and it only changes the content of text1 Thanks in … Software Development visual-basic | |
Hi, I am new to Dev C++ (and C programming iteself!). I was trying to write a project in Dev C++ and I faced two problems. I will really appreciate it if anyone can help: 1- I created a project and added one main file to it. There are some … Software Development c++ | |
Hello im having a problem with my program. Im trying to read in two files called list.txt and teachers.txt and set them to an array called studentList[] and teacherList[] but i dont know how to do that, any suggestions? I know i have to use a for loop but i … Software Development c | |
I am making a game using pygame and livewires. I am having trouble with the scoreboard- it updates appropriately but does not delete the old scoreboard, thus creating a blob of numbers: [CODE]class Ship(games.Sprite): """Ship, represents the player""" image = games.load_image("ship.bmp") DELAY = 25 def __init__(self, x, y): super(Ship, self).__init__(image … Software Development python | |
Hi, thanks for all the help with my code so far, I just have one more nagging chink in the chain. This is my code for saving my file which works as expected. [code] Person Bob = new Person(); Bob.CallSign = textBox1.Text; Bob.Freq = textBox2.Text; Bob.Time = textBox3.Text; Bob.fName = … Software Development c c# c++ file-stream | |
Hi Please tell vb.net equivalent of following method: [CODE=C#] private void LookForUpdates() { System.Threading.ThreadStart timerThreadStart = new System.Threading.ThreadStart(delegate() { sua = new ShowUpdatAvailable(); DelGetUpdateArgs delGetUpdateArgs = new DelGetUpdateArgs(this.GetUpdateArgs); sua.GetUpdateArgs = delGetUpdateArgs; sua.StartLookingForUpdate(); }); timerThread = new System.Threading.Thread(timerThreadStart); timerThread.Start(); } [/CODE] I tried using C# to VB.NET code converter which gave … Software Development c# vb.net visual-studio | |
Ok so this is an extra credit lab i have for any missed lab or replace for our lowest lab score for anyone has in the class. I'm not sure what im suppose to do with it the teacher just emailed us this info. If anyone can direct me to … Software Development c++ | |
Hello, I'm quite new to the world of C++ programming I just started to like and learn the language a year back. I have a problem which is related to sorting. Let's say I wanted to sort multiple array containers containing related elements. For example: [ICODE] Array1 Array2 Array3 Name … Software Development c++ | |
Hey guys, So I need to write a program that will prompt the user to enter the name of a .txt file, then count the occurence of each letter. It should print out the results on the screen and ask the user to enter a .txt file name to store … Software Development c++ | |
Hi all, I have a program, which is invoked from a shell script. I need to return back to the shell script a status, whether the program succeeded or failed, so the shell script determines whether to continue with its normal course of actions or to stop upon faileur. So, … Software Development java | |
Hello! I had a question about appending data in to a file. My program flows in the following way-- [CODE] // This function reads data from the file parse_input_data_for_one_algo(some parameters) { FILE *f = fopen (filename, "rw+"); while ( fgets (in_line, 100, f) != NULL ) { //read values } … Software Development algorithm c file-system | |
I have this program that I am working on that I am trying to insert user entered integers till a "-1" is detected and it will stop inserting the integers into the Tree and print it out inOrder. I am geting 2 errors: File: S:\makeup1.java [line: 9] Error: S:\makeup1.java:9: cannot … Software Development java | |
I'm trying to design a program that will input ages of 50 active duty Navy personnel and then finds the average age of current active duty Navy members. Here is my current pseudocode, could anyone tell me if there are errors? [code=text] Declare age[50] as integer Declare Sum, Average as … Software Development c++ | |
I officially have the worst C professor in the world. The guy hasn't answered my email in weeks and I don't have a class meeting before this assignment is due, so I have come here for some help. If anyone could point me in the right direction any part of … | |
I am trying to make a division and with the answer I want to separate the decimal and round it to two decimal points. After this, I want to assign the decimal part to another function. Thank You Software Development c++ | |
[B]Hi, I need urgent help on my assignment...please don't assume I'm asking you to write my program..I just need a guide to start. I've lost my USB so I lost all my programs, and all the notes etc from class and I've been sick lately so haven't been attending class … Software Development c++ | |
hello, I've wrote this calculator [code=python] from __future__ import division class num: x = input ("Input first number:\n") numb = num() class wtd:#wtd= what to do command = raw_input("What do you want to do?\nadd +\nsubstract -\ndivide /\nmultiply *\n") cmd1 = wtd() bull1 = cmd1.command while cmd1.command != "+" and cmd1.command … Software Development python | |
For my final project in COSC I, I am supposed to make a semi-poker simulation. Right now I am having trouble determining when the given hand is a fullHouse. Here is the whole program so far. [CODE] #include <ctime> // time for random number seed #include <iostream> #include <cstdlib> // … | |
I'm getting the error message "Error: expected initializer before 'sum' " from line 9 of my code when I try to compile my program. I can't seem to figure out why it would be throwing this error. Any help would be great. Thanks! [CODE] #include <iostream> using namespace std; struct … Software Development c++ | |
I`m trying to program this tic tac toe game, I have the screan printing like I want it to, but I don`t know how to take the user`s input and change the numbers in the array to an "X" or "O" depending on the user`s input, and upgrade the grid, … Software Development c++ | |
I am trying to create a dictionary program, just for fun. I doubt I will ever get past twenty words. But this program has a problem. It always goes to the word, no matter what I type in, or press. Here is the source code: [code=c++] #include <iostream> using namespace … | |
the error...[CODE]Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javaapplication1.memberTable.AddMember(memberTable.java:21) at javaapplication1.GUI3.memberAddActionPerformed(GUI3.java:2345) at javaapplication1.GUI3.access$000(GUI3.java:28) at javaapplication1.GUI3$1.actionPerformed(GUI3.java:352) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6041) at javax.swing.JComponent.processMouseEvent(JComponent.java:3265) at java.awt.Component.processEvent(Component.java:5806) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4413) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4243) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2440) at java.awt.Component.dispatchEvent(Component.java:4243) … Software Development java java-swing | |
Hey guys, I'm working on my final project for first semester of Freshmen year and I have a favor to ask of you guys. This project is very important for the final grade, so I'd love to know if I've made any errors so far? The program works, but I … Software Development c++ | |
In the following program, why is [COLOR="red"]"Ac"[/COLOR] the first thing that the program outputs? In main, [COLOR="red"]print "Printing a Card Object"[/COLOR] is the first think I see that should print anything. Is it the [COLOR="red"]__str__[/COLOR] method using the rank & suit attributes from the [COLOR="red"]__init__[/COLOR] constructor? [CODE]# Playing Cards # … Software Development python | |
I am tring to convert std:string to char* in several way, however non of these work: first way: [CODE] char* c_levelMapFile = new char[levelMapFile.length() + 1]; strcpy(c_levelMapFile, levelMapFile.c_str()); ifstream myfile(c_levelMapFile); myfile.is_open(); // returns false [/CODE] second way: [CODE] const char* c_levelMapFile = levelMapFile.append("\0"); ifstream myfile(c_levelMapFile); myfile.is_open(); // returns false [/CODE] … Software Development c++ | |
hi guys, i'm new in c++ programming in this forum too, seen many helpful threads so far, but i just can't get over this one, something wrong with my return value , it says so "total" is undeclared identifier (line 46), but when i declare it in main function as … Software Development c | |
[QUOTE]I have an assignment that requires me to use an array, menuList, of struct menuItemType with members string menuItem and double menuPrice. I have to display the menu, let the customer order, total the bill including tax and print the check. Function getData had to load the data into the … Software Development c++ | |
Hi, I am using the OR operator in my while loop and its not very responsive: [CODE]while (transaction != 'Q' || transaction != 'q' ){}[/CODE] The user previously entered a character for the variable transaction, however when the user enters 'Q' or 'q', the while loop is not skipped. Can … Software Development java | |
Hi i have a question about inputting to char*. For instance,i have made a class "Name",and am passing my constructors in as follows [CODE] Name* n1 = new Name("Nelly the elephant"); [/CODE] [CODE]Name::Name(char* name){ this->name = name; }[/CODE] But i am confused as to how i would code my addName().Ideally … Software Development c++ | |
Hi, I need to write a prolog predicate for diff/3 without using the built-in predicate subtract/3. The diff/3 predicate for example gives as follows: [code] ?-diff([1,3,3,4],[4,5,8],X) X=[1,3][/code] The diff(List1,List2,X) predicate takes List 1 and List 2 and unifies a new list X with all elements in List1 that do not … Software Development | |
I have a blackjack game(console game with visual c++), and I was wondering, how do I put in multiplayer? Software Development c++ | |
Compiler: DEV BloodShed C++ (latest release) I am following this windows api tutorial and am at this step [url]http://www.winprog.org/tutorial/menus.html[/url] [CODE] //FILE: resource.h // the below code is in a resource.h file // as stated in the instructions. #define IDR_MYMENU 101 #define IDI_MYICON 201 #define ID_FILE_EXIT 9001 #define ID_STUFF_GO 9002 [/CODE] … Software Development api c++ windows-api | |
[code] import java.util.*; import java.lang.*; class sub { public static void main(String[] args) { String a = "1"; String b = "2"; String c = "3"; String d = "4"; String e = "5"; String f = "6"; String g = "7"; Scanner sa1 = new Scanner(System.in); System.out.println("1) Encrypt"); System.out.println("2) … Software Development java |
The End.