43,549 Solved Topics
Remove Filter ![]() | |
void EnterWord() { char solution[20]; //holds solution char blank[20]; //holds "*"'s for unsolved letters int Subscript=0; int State=1; char Guess[20]; char Copy [20]; char Letter; int Correct =0 ; // input the string and getline it cout<<"Enter phrase 20 chars or less."<<endl; cin.getline(solution, 20); int Word; // this will hold … Software Development c++ | |
I have two programs, one is a GUI and the other is a normal (non GUI) program. How do I make a method in the non-GUI program wait until a JButton on the GUI gets clicked before continuing? (No while loops) This is frustrating since I'm fairly certain somebody here … | |
I am receiving the following compile errors: [CODE] BinarySearchTree.cpp:3: error: expected constructor, destructor, or type conversion before â<â token BinarySearchTree.cpp:9: error: expected initializer before â<â token BinarySearchTree.cpp:15: error: expected initializer before â<â token BinarySearchTree.cpp:21: error: expected initializer before â<â token [/CODE] Looking at my implementation, I fail to see the … Software Development c++ linked-list | |
Hey i am new to this forum. I am also new to C++. I really need help with this program because i cant get it to work! Since its my first time posting, if I am posting in the wrong way please tell me. My program holds phone numbers. uhm … Software Development c++ | |
[CODE]#include <iostream> #include <fstream> #include <string> #include <cctype> using namespace std; #define MAX_WORD_SIZE 15 // The maximum size of word #define MAX_WORDS 255 // the max number of words void EnterWord(); void LoadFile(); void ChooseWord(); void RunGame(); void instruction(); void DrawGallows(int State); typedef char String [MAX_WORD_SIZE]; // a char type … Software Development c++ | |
What's the command that allows you to do that. The chapter that i'm reading lists slicing, but I don't see how that helps if you don't have a fixed value of the word. [Code=Python] # Program that gets a message from user and computer prints it out backward. message = … Software Development python | |
Greetings, I would like to make a programm that would generate a long string of numbers or characters in the way that the user firts states how long the so called word should be (let's say 10 000) and will also state the rules for creating the word: i.e. 1 … Software Development python | |
I am writing a program using Python and the PYOpenGL3 library. I am trying to use PY2Exe to create an executable version of my program. However PY2Exe does not support PYOpenGL3. Is there an alternative to PY2Exe I can use? Basically I need a way to create an executable version … Software Development python | |
Hi guys! I am new to java and I have a little problem with ma Java code. My application should read and paint an Image from file. The information about the image are in text format and the image can be composed of rectangles and circles. An example: rectangle { … Software Development java | |
I am having a problem with the results that I am getting when I run my program, according to the math i wrote in the program when I enter these results object's x co-ord = 0 object's y cor-ord = 0 object's heading = 45 degrees object's distance travelled = … Software Development c++ | |
hello is there a way i can read from a table in microsoft exel file into an array or matrix in c# ? Software Development c# | |
Hi The [I]System.Windows.Forms.SendKeys.Send[/I] method does not support sending Left or Right shift key. How can I send these keys in C#? thanks in advance Software Development | |
First off, thank you for taking the time to read this. Here is my question: I am reading data in from a file that contains names for items that I will be placing onto a heap for use in a program. The program gives me all of the desired data … Software Development c++ | |
an error is found on line: letters = input.Substring((count), 2) it says that the index must be within the string I don't see why it is an error can anyone help? Function DigramCount(ByVal input As String) 'takes two charcters at a time out of input 'string and determines their frequencies … Software Development vb.net | |
Hi Guys, I am trying to make a console based ATM Machine simulator, I have removed all the code that was not relevant to this challenge I am having. What I am trying to do in display the balance which I can do, opening balance is 94.37, then I need … Software Development | |
I am gettin this compile error and for the life of me cannot figure it out: [CODE] BinarySearchTree.h:22: error: type âintâ is not a direct base of âBinarySearchTree<int, int, std::less<int> >::BinaryNodeâ [/CODE] This is the header file file the error refers: [CODE=cplusplus] #ifndef BINARY_SEARCH_TREE_H #define BINARY_SEARCH_TREE_H #include <cstdlib> #include <functional> … Software Development c++ | |
I tried to modify this merge sort method to sort an array of type T. Its an merge sort except iterative. I was just wondering why it wouldn't sort right? Can anyone help me out? [CODE=Java]public static <T extends Comparable<? super T>> void iterativeMergeSort(T[] input) { // Create a temporary … Software Development java | |
Hi, i am using CMsFlexGrid in my project. the problem i m facing is the alignment of data ie when i store integer, double its getting aligned to right when i store strings its getting left aligned pls help. Display look very horrible :( .how to change it i dont … Software Development c++ | |
Hey, one of you guys suggested that I go on Wikipedia's page for hash tables. It was actually pretty informative. I'm pressed for time so I am doing separate chaining for my hash table because it seems like it will be one of the easiest to implement (and according to … Software Development java | |
Hello, I'm writing a a program in C++ that adds/subtracts complex numbers. I'm having trouble writing the square root of -1 or "i" in a complex number. Complex number: realPart + imaginaryPart * i (where i is /-1) ["square root of -1"] so far I'm thinking the code is something … Software Development c++ | |
Hi all, I added a class named RandomVariableGenerator with the following functions in the .h file [code] static double GetRandomNumber(void); static double GetExponential(double beta); static double GetUnifrom(double a, double b); [/code] but after building them i got the following errors: Error 1 error LNK2020: unresolved token (06000002) RandomVariableGenerator::GetRandomNumber Error 3 … Software Development c++ | |
Hello everybody... I'have bound a database to my form, and it displays the record of some fields from my database. I want to make the displayed record so that it can be searched by clicking the "find" button by the related searching categories. Below are coding that i've used.. [Private … Software Development microsoft-access visual-basic | |
I have a assignment that we are to write two clases (Ballot, Votes). We are to use an array of Ballot type to hold information for each particular Ballot. The Votes class is used to mark the ballots, count up all to votes, delete a ballot etc. I have the … Software Development c++ | |
Hi all, I used a function called GetRandomVariable to return a double data type and here's its code: [code]double GetRandomNumber(void) { // Zi = (AZi-1 + C)(mod m) // Zi = (5Zi-1 + 3)(mod 16) RandomVariableGenerator::Znode = (double)((5.0*RandomVariableGenerator::Znode + 3) % 16); return RandomVariableGenerator::Znode/16; } static double Znode = 7.0; … Software Development c++ | |
hey..I need to convert a 8 value bool array to char.How can I do this? Software Development c++ | |
[code] #include <conio.h> #include <graphics.h> #include <math.h> #include <stdlib.h> #include <dos.h> void serp(int level, int Ax, int Ay, int Bx, int By) { int poly[4]={Ax,Ay,Bx,By}; setfillstyle(SOLID_FILL,YELLOW); if (level>0) { serp(level-1, Ax,Ay ,(2*Ax+Bx)/3,(2*Ay+By)/3); serp(level-1,(2*Ax+Bx)/3,(2*Ay+By)/3,(Ax+Bx)/2+sqrt(3)*(Ay-By)/6,(Ay+By)/2+sqrt(3)*(Bx-Ax)/6); serp(level-1,(Ax+Bx)/2+sqrt(3)*(Ay-By)/6,(Ay+By)/2+sqrt(3)*(Bx-Ax)/6,(Ax+2*Bx)/3,(Ay+2*By)/3); serp(level-1,(Ax+2*Bx)/3,(Ay+2*By)/3,Bx,By); } else fillpoly(2,poly); } int main(void) { int graphdriver=DETECT, graphmode; initgraph(&graphdriver, &graphmode, ""); int i, … Software Development c++ | |
Hello everyone, I am having problem with a multiple public definition: ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: currenpacketbeingsampled MODULE: DataSampling.obj (DATASAMPLING) DEFINED: Main.obj (MAIN) The variable in question is defined only once in the header file, and only used in the associated C file. From my understanding a macro guard … Software Development c | |
OK, this may be a dumb question but I'll ask anyway. I am starting to see the benefits of using classes. Most notably code reuse, inheritance and overloading. Shoud I still be writing fuctions in my scripts or do classes make them obsolete? Is there a rule of thumb that … Software Development python | |
Hi, i was tring to figure how set display mode to fullscreen under win2000, i saw at msdn that theres a SetConsoleDisplayMode, but that is for winXP +.. I tried [CODE] //sets the console window //to fullscreen void FullScreen(){ HANDLE consolehandle; int sysmetrics_x=GetSystemMetrics(SM_CXFULLSCREEN);//get full width int sysmetrics_y=GetSystemMetrics(SM_CYFULLSCREEN);//get full height COORD … Software Development c++ | |
Hello, I'm having a simple problem. For my program, each song has an id number which stores the songs information. For my deleteSong function, I am asking the user what id of the song does he/she wants to be deleted. After the user enters the id of the song he/she … Software Development c++ linked-list | |
Hi, I have a program problem with converting decimals to binary and back again. My teacher said that the program is to be like a menu and convert decimals or binary from the user's input. This is part of my code: [code=cplusplus] #include <iostream> #include <string> using namespace std; void … Software Development c++ | |
how would I get the install directory of another program, the registry perhaps? (using HLDS as my directory to be found) [URL="http://storefront.steampowered.com/download/hldsupdatetool.exe"](GET HLDS HERE!)[/URL] i fond the key which might be useful. (how would i open it? [CODE][HKEY_CURRENT_USER\Software\Valve\HLServer] "InstallPath"="C:\\hlds" "Full Name"="Half-Life Dedicated Server" "Region"="5" [/CODE] Software Development c++ | |
Busy writing an infix to postfix converter.(I'm a strange guy. I like to do those things from time to time...) I have a class Expression which is in essence : [CODE=csharp] [StructLayout(LayoutKind.Explicit)] //in c/c++ this is a union public struct Valoper { [FieldOffset(0)] public int Value; [FieldOffset(0)] public Oper Operand; … Software Development queue | |
I'm trying to get this code from the microsoft msdn site working and having problems. [code] // Navigates to the URL in the address box when // the ENTER key is pressed while the ToolStripTextBox has focus. private void toolStripTextBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { Navigate(toolStripTextBox1.Text); … Software Development | |
whenever the clearMemory function is called i get a segmentation fault and i can not figure out whats wrong. The function is supposed to delete all pointers. The function brings in the pointer to the linked list by reference. The nodes in the list are structs i named bus that … Software Development c++ linked-list | |
hi im new to daniweb im currently working on a piece of work. the idea is to create a bank account with deposit and withdrawal functions. create student business and current accounts (this is all roughly done and a case of copying and pasting for each account type with a … Software Development c++ | |
Hi, I was told that you can crash Windows in C++ or C by "corrupting the kernel", and I wanted to know if this was actually possible. If anyone knows if this is possible, or how it happens, please tell me. ;) Software Development c++ | |
Hello everyone. I need help using an instance of a class in another. Below are two header files. NumDays.h and TimeOff.h I need to have instances of the NumDays class in the TimeOff class as members. When i try to create the instance called maxSickDays, i do not get access … Software Development c++ | |
OK, I'm making a backup application and once the backup is complete, I want it to flash FINISHED!!!! - in different colours - any help at all would be appreciated, thanks - MaxICube | |
Hi , I am newbie in C#. I created a database by right clicking on the project in solution explorer and by selecting add new item then selecting database. Database name is SAMP and it has a table called Account. can somebody tell me how to connect to this database … Software Development database-design | |
hello guyzz,,,i am almost finished with my code,,but our teacher require us to access a text file..this is it: in my text file: accountList.txt 12345 1234 200000 Jerry Lopez first column was accountNumber, then the pinNumber, then the balance and the name.. what i did was... import java.io.*; public class … Software Development file-system java | |
This is what i did for the factorial assignment that we had.. but i have a little trouble in my recursionFactorial method.. can anyone help? tnx public class Factorial { public static void main(String[] args) { int index = JOptionPane.showConfirmDialog(null,"Would you like to compute\n" + "for the factorial of a … Software Development java | |
I wondered if anyone could help. I am trying to use a FileChooser in java. I have got the dialog box to appear and can select the file, but the box just displays "opening" and the file name. how to I add to the code to make it actually open … Software Development java java-swing | |
hi all, I want to restrict user enter upto value 1000 in a datagridview cell editbegin event.How to check this after we set the following. dataGridViewValueUnits.BeginEdit(true); Software Development | |
Hi All I am trying to convert xml file to a text file. But my program creates an empty text file and does not copy any text from the xml file. Please help Thanks My code: Dim Doc As New XmlDocument Dim NodeList As XmlNodeList Doc.Load("C:\Temp\MyXml.xml") NodeList = Doc.SelectNodes("/response/TAG") Dim … | |
The protection on code generated in NetBeans is great. untill it gets it wrong and you have an arbitrary line protected and it totally stuffs up your code and you can not longer work on your project!! Anyone know how to temporarily remove the protection, edit what you want and … Software Development java java-netbeans | |
I have made this application where theres a tlistview whit image destinations in it. Then i got a timer to shift the picture. then ive addet a random function to shuffle through the picture. now what i want to happen is that the same picture dont get shown twice. So … Software Development pascal | |
hey there , Im taking C++ courses in my collage (so ım a newbie) and they are teaching programing language a bit different from the examples in this forum. [code=c] #include <stdio.h> int main (void) { int x; int y; int z; int min; printf("enter 3 numbers : "); scanf("%d … Software Development c++ | |
[code] void writingTransactionToFile(string transaction) { string temp; int test; ifstream myfile("transactionlog.txt"); ofstream tempfile ("tempfile.txt", ios::app); if (tempfile.is_open()) { tempfile << transaction; if(myfile.is_open()) { while(!myfile.eof()) { getline(myfile,temp); cout << temp; tempfile << temp << endl; } } else { cout << "Unable to open file."; } tempfile.close(); myfile.close(); } else cout … | |
I have had this problem a couple of times but i am unsure of what it means. could someone tell me what the error message "non-lvalue in assignment" translates to in english, please? Software Development c++ |
The End.