199,114 Archived Topics
Remove Filter ![]() | |
I am watching lectures on C++ from the stanford online courses website. I have a slight problem in understanding how memory is allocated for a string in C++. Basically when you declare a vector the constructor is called and memory is allocated for the array arr, numUsed and numAllocated are … | |
Hi gurus's :cool: I have got an actionListner in my code. The problem is that when I try to set my JLabel as true it does not work and does not show up in the GUI ? :@ [CODE]Button.addActionListener( new ActionListner(){ public void actionPerformed(ActionEvent e){ label.setVisible(true); myFunction() //here's some timeconsuming … | |
struct tnode { int data; struct tnode* left; struct tnode* right; }; struct tnode*talloc(int data) { struct tnode*p=(struct tnode*) malloc(sizeof(struct tnode)) if (p!=NULL) { p->data=data; p->next=NULL; p->right=NULL; } return p; } int main(){} I am getting a [error: 'NULL' undeclared] error, Any help would be greatly appreciated. | |
I am using treeview with checkboxes in each node as shown below: +[]Main []Child1 []Child2 I have an indicator from form1 which is checkbox1 and checkbox2 that is uses to control the checkboxes of child1 and 2. If checkbox1 is true automatically child1 will be true, and if checkbox2 is … | |
hi everyone how to generate random codes given to the computer if i give three codes example : 123,234,567 i need to output anyone of these at a time | |
Hello Great developers, i am working on an application, where i am trying to implement the multiple users chat, Basically the users send message to mobile and then get back the reply , then it shows like normal chatting. all everything is working and GREAT :icon_wink: But Except the multiple … ![]() | |
I have recently tried installing cherrypy to no avail, and it got me wondering, is there a way to build websites using the wxpython toolkit? if somebody knows the answer and could point me in the right direction it would be a massive help | |
iam trying to install phpmydirectory to my localhost server (i have testing it using xampp and wamp)...but there is a problem; when iam using wamp, the installation of mhpmydirectory working just fine, but then i cannot login as administrator. If i check on mysql there is administrator username and password, … | |
Ok, back to differences between 2.x and 3.x... I have the following code to convert the sort key to a float: [CODE]def sort_key_func(row): return float(row[76][0:5]) [/CODE] which (under 2.x) returned the value of the field in the current row in position 76 for a lengthof 5. It was called like … | |
So this is part of the code in one of my functions, and whenever I enter either yes, no, or something else, no matter what the response the do loop will loop again. I don't think my "if(response == "yes")" is working. Help please? :D [CODE] char response[10]; int answer; … | |
I am doing a project using Java swing in Netbeans and I am using their in-built GUI generator thing. I have created a socket in one frame and i need to use the same object in another frame. these frames are present in the same package but are different classes. … | |
I have a problem with code I am writing. I am supposed to count the instances of each specific digit that the user inputs. I am supposed to output blank digit appears blank time(s). I figured out how to get the numbers to go to different indexes in the array … | |
I have to convert 2D into 2 of Diamonds. I can not use if statements. If the person enters 10C then it prints out 10 of clubs. I've contemplated trying taking the string length, taking the position end of the string and using the D,C,S,H in the switch statements But … | |
Hello guys, This project requires the use of an array of pointers to aRandomNumberGenerator (i'll call it Random for short) objects. Both aDie and aCoin are derived classes of the Random class. I am to use the array to call the virtual function generate. My problem arises in my main … | |
I want to retrive some controls form form1 to form2. i dont know how to do it. Please any one help me to solve this problem... virusisfund | |
Hello everybody! I am just a beginner in C, so i have some problems with the password input . This is for bank account, it asks user for password input, but it doesn't works properly for three attempts, in order to go to menu: Could you help me please, what … | |
I write this program to cheak user name and password enter by the use is same then the user is able to login, for this i declare a pointer array to store some user name and password (like sin up by user),and then the user enter her user name and … | |
((serverDlg*)m_pDlg)->OnReceive(port); I built a server using MFC, and had to get the foundation going by using examples online. The OnReceieve(port), is a function that I created in my CDialog class. ((serverDlg*)m_pDlg) is the part I don't get. This line of code is in a function in my socket class, and … | |
Hi everyone, I was wondering if there's a way to write a command to the terminal from a c++ program. I'd like to be able to have some kind of loop with a Makefile, so the last command on a makefile runs the makefile again. Otherwise, is there a way … | |
Is it possible to rewrite the following VB.NET code in VB6? [CODE]Dim Names(,) As String = New String(,) {{"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, {"UserName", "RealName"}, … | |
Hello everyone, I'm working on my game project and my aim is now to produce the interface part. I've found that there is an easy way to produce some text on the screen with [I]glutBitmapCharacter[/I] and it's working quite well except the font choice is a little bit restrictive. So … | |
Dear VB Pros, Please I want to solicit your assistance on a comprehensive database design for the following explanation: I have a customer order form comprising of: 1. the following controls will get information from the customer that will be stored in the customer table. [[B]CustomerName[/B]], [[B]CustomerAddress[/B]], [[B]City[/B]], [[B]State[/B]], [[B]DateofPurchase[/B]] … | |
Hello, I'm simply trying to keep track of how many times a space is encounteed in a string and then print the number of times to the console. Can someone please examine and give me a tip on what is wrong? Thank you! [CODE] #include <iostream> using namespace std; int … | |
one thread try to read from vector and another thread try to delete from vector how to do it | |
Hello World, [INDENT][/INDENT]Can anybody help me to create a windows applcation with turbo c. Am newbe in turbo c and I learned to make c programmes very well, but I Am facing a lot of problems since I moved to windows applications and i can't understant why turbo c doesn't … | |
If I have the following line in a bash script, it works fine: [CODE]CoDescDate=$(awk -F"\t" '{print $22}' $1)[/CODE] If I embed the above line in a function that is within the same bash script, the script seems to hang at the point of invoking the function. [CODE]pay_ending_date () { CoDescDate=$(awk … | |
Hi Does anybody out there know of some open source projects that uses Java and would be happy to accept another developer? I am busy with a skills upgrade effort (not to mention that I am looking to build my Java knowledge). Right now I am learning design patterns and … | |
Hi everyone, I want to copy the output of a program with another program so I can write it to a file. I'm running Ubuntu Linux, and I'm trying to see what my system is like with hwinfo. The list is too long, though, so I need to put it … | |
I am a beginner to advance java and since am learning servlet am getting some weird error in my servlet. I am trying to get the method name and this is the code which i wrote down [CODE] import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class NewServlet extends … | |
I'm trying to compile an executable (ELF file) that does not use a dynamic loader. I built a cross compiler that compiles mips from linux to be used on a simulator I made. I asserted the flag -static-libgcc on compilation of my hello.cpp file (hello world program). Apparently this is … | |
I have a form that creates a row of checkboxes depending on the type of analysis the user wants to perform on the incoming file. I need to be able to determine if the checkbox is "checked" but I don't know how to do that when the controls are created … | |
Can someone please help with the following problem I am trying to update a sql database through a command builder but I keep getting an sql exception (Additional information: System error.). I dont know where I am going wrong because I thought the command builder should carry out the update … | |
Hie guys!I am developing an application(has 4 forms so far) and I want the Login form to be closed when one is on the Main Form.The application has an option of exiting the system on the Main Form but when I do that the Login Form will still be there..I … | |
Well i have a small code snippet which is a basic http server. Well its running fine , but i am unable to catch the feedback and store it in a log file of my own for further analysis. code snippet : [URL="http://codepad.org/MppnYU9n"]http://codepad.org/MppnYU9n[/URL] just in case wondering on how to … | |
Hey all. First post ;) and since i've used this site a lot for help i think its about time i registered and joined up. Im not new to programming but i am new with php + database manipulation. [CODE] $app = mysql_query("SELECT * FROM applicant_classinfo WHERE appid='".$_GET['id']."' AND '".$_GET['cname']."'"); … | |
This might sound like a noob question, but that is because I am a noob. Anyways, I was just wondering what's good about inheritance and polymorphism in game development? I'm learning about them now and I can understand it mostly, but I can't wrap my head around an important use … | |
// function declaration char* operator LPCTSTR(); // defenition char* String::operator LPCTSTR() { char* szArry = NULL; szArry[1024]; reurn(szArry); } how we can create a LPCTSTR string class member function in c++ | |
So far I have written a program that draws text to the screen and I am able to change the font type but I am unable to change the font size. Here are the 3 main parts of my code that I think you need to see. Font structure: [CODE]typedef … | |
Hello, I really have no clue how to start creating a game engine, what skills I need in C++, I want the engine to be for 2d RPG games and relatively simple, mostly for experience. Could someone give me a step by step guide or something, I'm just really baffled … | |
I'm working on a C program that needs a lot of dynamic memory allocation of 1-D and 2-D arrays. The program works fine when I compile and run it using windows and Visual C++, but when I compile and run it in a Unix environment, I get slightly different results, … | |
Hi, I am writing a program in Excel Macro, where I need to create an array and then have to check wheather an element exists or not in that array. I have created the array as follows - Dim tmpArr(1 to 10) as Integer tmpArr = Array(2,4,6,8,10) Now, i can't … | |
Sir, i'm new here searched the forums and web. I'm a beginner and dont know C very well. The Question actually is this: [QUOTE]Write a C function called DistinctWords that counts the distinct words in its input string and prints them in the descending order of number of its occurrence. … | |
Hello All, I have a simple question How do i get a variable from one function into another function. I am new to javascript. Here is my code[CODE] function timestart(that) { var x = new Date(); that.value = x; } function timeend(that) { var y = new Date() that.value = … | |
hi can you please help me with my project??? it is all about on making a map of the realty houses...and i dont have an idea to do it.. my teacher said..the concept is when you search the person his/her house will zoom in..please help me... | |
I am writing a web page, on this web page there is a txtStart and txtEnd. Next to them I have Calendar ImageButtons. I would like to code it so when the ImageButton is clicked a calendar popup appears and when they select a date on the popup it goes … | |
My program basically asks the users for a value (s) then calculates and displays the First, Middle, Last, and Final. The users have a choice to enter the value either in integer, real or character. If the user enters it in real or character, it will be converted into integer … | |
Hello everybody, I have some trouble with the google maps api. I want to add markers from a xml file to my map but it seems that the function is not parsing my xml file and I am clueless. Any ideas here is my code: [code] <!DOCTYPE html> <html> <head> … | |
hi am trying to code a program that uses a panel that has a functional calculator in it, and the calculator can be re-sized using a slider. here is my code please help me out import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; public class CalcInSlider extends JPanel{ JSlider slider; … | |
I am having issues parsing JSON data from a web service. The web service is local on my machine, and I have added it as a Web Reference. Simple data types from the service work perfectly. However, if I call a method that returns a complex structure (such as an … |
The End.