199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for trantran

[CODE] class C{ friend class F; private: fct1(){} fct2(){} fct3(){} public: fct_for_everyone(){} }; class F{ }; [/CODE] F is a friend of C, so it has access to fct1,fct2,fct3. But in real life, friendship has limits! You don't want to reveal everything! So is there a way in C++ to …

Member Avatar for mike_2000_17
0
161
Member Avatar for Thomas Tong

}[CODE]#include <stdio.h> #include <string.h> struct cd_detail { char group[20]; char name[50]; int year; double price, playtime,costTotal; } cd[7]={{"Alan","Tibet sing",2008,51,600}, {"Thubasa","Fly away",2007,52,700}, {"Alan","I love China",2010,53,500}, {"pitbull","Jump to jump",2005,54,720}, {"pitbull","crazy mix",2009,48,630}, {"pitbull","Let we ROCK",2010,49,608}, {"Alan","Sakura mansume",2010,56,909}}; void main() { char group[20]; int k; printf("Enter group>"); gets (group); printf("Name \tYear \tPrice \tPlaytime\n"); printf("========\t=======\t======\t=============\n"); …

Member Avatar for vidit_X
0
237
Member Avatar for guccimane

Hi All. I am trying to learn linked lists, and I am a little bit confused what the next pointer as well as the head pointer does. I was reading a tutorial online, and they gave this example. [CODE]#include <iostream> #include <string> using namespace std; struct Family { string nameOfFamilyMember; …

Member Avatar for vidit_X
0
104
Member Avatar for Infame

Hi. I'm currently trying to make a comment system. It works great, 'cept, if the user writes </html> or... any other html tag that doesn't close. Now, my initial idea was to convert string, i.e: space(' ', 32) -> &lpsb;, \n -> <br />. For that, I made an array, …

Member Avatar for diafol
0
169
Member Avatar for krishnisilva

hi there, how can i validate a data grid view column to enter only the date in the data grid view column. i am doing this in a 2008 VS C# standard edition software. how can i do this. thankx

Member Avatar for FijiXzone.com
0
2K
Member Avatar for Sunshine2011

Within this code I would like to save the data which was input through a function "SavePlayer", but it doesn't work. The compiler "says" that object "a" ist not known. Probably the bold line [CODE][B][I]a.SavePlayer(manyPlayer,Player a); [/I][/B][/CODE]is wrong, but I have no idea how to solve the problem. Maybe someone …

Member Avatar for dluz
0
101
Member Avatar for SyncMaster170

So heres my code: using (SqlDataReader reader = cmd.ExecuteReader()) if (reader.Read()) SearchingDate = (DateTime)reader[0]; The third line of code is where im stuck. In my app, im trying to compare the current datetime against the value of a members date column value. Unfortunately, the third line of code sets the …

Member Avatar for Mitja Bonca
0
105
Member Avatar for getmet

I cant see to figure out what im diong wrong here... many errors [CODE]public class Card { private String suit; private int face; public static void main(String[] args) { Card allSuit[] = new Card[4]; for (int i = 0; i<allSuit.length; i++) { allSuit[i] = new Card(); } allSuit[0] = new …

Member Avatar for Ezzaral
0
203
Member Avatar for Tcll

does anyone have any note on rewriting C/C++ programs in Python?? google and bing give me the exact opposite, and I've got a headache from searching... please note that I can't read C++ if you need the program I'm rewriting, please let me know

Member Avatar for JoshuaBurleson
0
2K
Member Avatar for justMarshall

I've created a user control with a simple text box and a corresponding label and added a few custom control properties. When added to a form, I'm trying to loop through all control of this type and evaluate the custom property. In the below, the cntl.MyCustomProperty is not recognized. I …

Member Avatar for justMarshall
0
228
Member Avatar for Frederick2

I'm passing a this pointer in my constructor initialization list for use by a base class and VC9 gives me this warning about it... main.cpp(124) : warning C4355: 'this' : used in base member initializer list The program runs perfectly as compiled by VC9 Pro or Code::Blocks 10.05. In Code::Blocks …

Member Avatar for mike_2000_17
0
279
Member Avatar for linux

Running: Windows 7 Home Premium. I am not sure if I am posting this in the correct board, so please move this if I am incorrect in my post placement. I am trying to set Allegro up, for programming a 2D game in C (which is why I chose this …

Member Avatar for linux
0
534
Member Avatar for thebiff

I am trying to create waypoints from a given file waypoints.txt I first created the waypoint class [CODE] import java.io.*; import java.util.*; import java.util.HashMap; import java.util.Iterator; public class waypoint { int x; int y; int height; int cost; int gold; int mapX; int mapY; public waypoint(int myX,int myY,int myHeight,int myCost,int …

Member Avatar for thebiff
0
268
Member Avatar for sergent

In all the new IDEs when using open and close curly brackets the auto-formatting usually indents, and uses the extendable block (with the + sign) even if it is not necessary. For example, I like when all my functions have there own little extendable block but when I place them …

Member Avatar for dospy
0
100
Member Avatar for mishphar

When I am reading a csv file to dataTable and populating a Datagridview I am getting problem that one blank row inserted into datagridview why? what wrong with my code please somebody help me. below my code Private Sub ReadCsv() Dim myTable As DataTable = New DataTable Dim i As …

Member Avatar for Phasma
0
354
Member Avatar for bigredaltoid

Disclaimer: I am not looking for a full answer to this lab, only hints. I know people get frustrated when others ask to do their homework for them. ;P Hey guys - first post here, although I have used this website many times to assist me with my Programming classes. …

Member Avatar for TrustyTony
0
405
Member Avatar for neovantage

Hello, I am using fancy upload in my application. I easily integrate fancyupload in my page as per advised in the fancyupload website. When i get response after uploading the file on server, i want to append the filename of uploaded file in multiple selectboxes in my page. I found …

Member Avatar for diafol
0
660
Member Avatar for stoopkid

I've literally copy and pasted a basic AJAX function from W3 Schools, and for some odd reason it refuses to work on my site...please help. Here is my HTML: [code] <select name="address" onChange="sortAddress(this.value)"> <option value="" selected="selected">Building Address</option> <?php $sql = "SELECT DISTINCT name FROM buildings ORDER BY location"; $result = …

Member Avatar for stoopkid
0
209
Member Avatar for bibiki

Hey there, I built the following app; A frame that with three sections inside it. Each section is actually a panel. The first panel is a form I use for saving soccer matches on my database; The second holds only one button that reads textfields from the form above and …

Member Avatar for bibiki
0
557
Member Avatar for Muel12

Hello Everyone My background: Civil/Structural and Mechanical Engineering. I work as a Structural Engineer designing bridges. I would like to develop a program that analyzes and design structures but do not know much about software development. I have created a library of spreadsheets that are very powerful and when working …

Member Avatar for Muel12
0
157
Member Avatar for blaaam

Hi! I'm start learn php and i have few problems what i can't fix it. Before i say what is my problem, YES i have search for my problem in google and other. So my question is how to make 1)table with few data column and after few column i …

Member Avatar for diafol
0
219
Member Avatar for nuliknol

Hi, is there a way to do 128 bit comparison in one instruction with SSE 4.2a? I need to compare if the XMM0 register is 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF If not, what would be the fastest way to compare with two steps of 64bit comparisions? Thanks in advance.

Member Avatar for untio
0
90
Member Avatar for getmet

i get no GUI when i run! import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Calculator { private JTextField resultTF; private JButton calculateB, numbersB[] = new JButton[11]; public void driver() { //Create Window JFrame calc = new JFrame("Calculator version 1.0"); calc.setSize(500, 500); calc.setDefaultCloseOperation(calc.EXIT_ON_CLOSE); //Get the content pane (object of type …

Member Avatar for JamesCherrill
0
208
Member Avatar for Raj619
Member Avatar for anand01
0
99
Member Avatar for M.S.

Hi All How can I select some random names from a list, so that in next time, those previously selected names become omitted from the list? for example, say we have 100 names in test.txt file, and we want to select 3 names randomly. then by recalling the selection function, …

Member Avatar for M.S.
0
6K
Member Avatar for dospy

i've downloaded the last version of boost(1_47_0) but i don't know how to build it, i tried to find a tutorial on google but that didn't help much because it was for a very old version and some thing changed. anyway, my compiler does have minimal support for C++0x, will …

Member Avatar for dospy
0
153
Member Avatar for Will Gresham

Hello all, I have an issue with a class I am writing which is supposed to be able to multiple 2 matrices together. The issue I am having is not the actual multiplication (That bit works, thanks for the pointers yesterday). The problem, or so I assume, is with my …

Member Avatar for Fbody
0
157
Member Avatar for mattnguyen45

The Class has no error, but the test program has a constructor error on line 21. [CODE] /** * DataSet Class * * @version 10/3/11 */ public class DataSet { private int Sum; private double Average; private int Largest; private int Smallest; public DataSet(int Sum,int Largest,int Smallest, double Average) { …

Member Avatar for JamesCherrill
0
214
Member Avatar for Shruthi_R

hi am developing an application to upload images to gridview which i have completed ,now i need to create directories and subdirectories to upload the images according to their type i have written a class to read all directories like public Classname[] Getdirectories(string name) { string basepath=System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPAth +"images"+"/"+name; string[] files=Directory.GetDirectories(basepath); …

Member Avatar for Dehni
0
228
Member Avatar for khalid_farooq

[CODE]/* * hello.c * This is a simple, introductory OpenGL program. */ #include<stdlib.h> #include <GL/glut.h> #include<iostream> #include<fstream> using std::fstream; using namespace std; void draw(void) { /* clear all pixels */ char fileName[] = "house1.txt"; fstream instream; instream.open("c:/house1.txt",ios::in); if(instream.fail()) return; glClear (GL_COLOR_BUFFER_BIT); GLint numstrip,numlines,x, y; instream>>numstrip; for(int j=0;j<numstrip;j++) { instream>>numlines; glBegin(GL_LINE_STRIP); …

Member Avatar for gusano79
0
617
Member Avatar for spencer.kindt

I have to make a bank GUI and I have a Jlist that populates with the customer objects (viewable by name) and I can view their individual info... but when I select the customer, I also want to be able to pull their account info and put it in a …

0
124
Member Avatar for new_2_java

Hi all, I am trying to compile a servlet, and am getting the following error. [code] C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\flatironswp1\WEB-INF\classes>javac export\ExportUtil.java export\ExportUtil.java:5: package javax.servlet.http does not exist import javax.servlet.http.*; ^ [/code] and here's my code: [code] package export; import java.io.*; import javax.servlet.http.*; import javax.servlet.*; public class ExportUtil extends HttpServlet …

Member Avatar for Taywin
0
4K
Member Avatar for Leaningnew

actually in gcc compiler of linux everything is working fine without header files... Then what is the real use of the header files in c & c++ langs ?? can anyone ans it??

Member Avatar for gusano79
0
176
Member Avatar for swissknife007

[CODE] #include<stdio.h> #include<conio.h> void hello() { printf("\nHELLO\n"); } int main() { hello(); hello(); hello(); hello(); getch(); return 0; } [/CODE] If I run this code on a compiler,how many processes and how many threads will be running on the compiler and which ones? Does a duplicate function call consist another …

Member Avatar for gerard4143
0
186
Member Avatar for JoshuaBurleson

Just fooling around I came across an issue updating a digital-clock like label. This: [CODE]self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime()) self.clock=ttk.Label(self,text=self.now) self.clock.pack() while True: self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime()) self.clock['text']=self.now[/CODE] simply freezes the program, I've managed to get it to update on certain events like the user hitting a button but …

Member Avatar for JoshuaBurleson
0
217
Member Avatar for geeerald1131

I am going to make a project. My professor told us to make any java program. I am planning to create a grading system. That outputs: Name: Student Number: Course: Class Standing: Seatworks Grade: 5% Homeworks Grade: 5% Quizes Grade: 15% Preliminary Exam: 35% Final Exam: 40% Total: 100% and …

Member Avatar for Ezzaral
0
100
Member Avatar for Mahesha999

Hi there. I am writing JavaScript to allow user to input only alphabets in the textbox. I am using regular expression: /[A-Za-z]/g which is logically correct. However, IE9, Crome 14 and Firefox 4 allows some specific characters: $%&( Why is that. Just copy and save the code as html. And …

Member Avatar for Taywin
0
669
Member Avatar for shootingrubber

Hello, I recently started learning java, and I am trying to make a program and I am running into some trouble. Basically what I want is for the user to input the number of people attending a movie, and then the user could input all of the ages of the …

Member Avatar for shootingrubber
0
188
Member Avatar for Zssffssz

Ok how do I change the texts color without changing all the couts to printfs and without using system("color hex")

Member Avatar for Narue
0
205
Member Avatar for Zssffssz

Sorry about the typo in title. Ok my school is addicted to making us mad and have blocked command promp that I brought my copy from home on a floppy disk and it blocked me. So what I need is a few alternatives for these: cls - clears the screen …

Member Avatar for Narue
0
139
Member Avatar for rohitshukla

Dear seniors, I am a newbie in wxPython and I have to write a code that can immediately start playing a video after I load the file. I have been going through a lot of forums tried to implement 10 - 20 codes, but the wx.media is not playing the …

Member Avatar for rohitshukla
0
556
Member Avatar for kweigand

I am creating methods that will extract info out of a text file. The program is for a real estate office manager who needs to run reports on property listings. The text file will contain property number, property type, price, and agent id as follows. [CODE]110001 commercial 500000.00 101 110223 …

Member Avatar for ~s.o.s~
0
678
Member Avatar for dev90

In structure hen i read floating point value from user and i get the error like"floating point not conneted..." i have been sugested to write two lines for that extern void float conetor(); #pragma extref floatconnector even though i got the same error it is not even asking for float …

Member Avatar for Narue
0
156
Member Avatar for softswing

Hai Fiends, I need to add \r\n(if \n is present or not) at end of every line of a huge file. how can i do this in java, with high performance. please help me in this problem.

Member Avatar for softswing
0
124
Member Avatar for etangryk08
Member Avatar for Evilfairy
0
400
Member Avatar for ayesha08

Our teacher made us make a program that computes midterm grade. I have made my code already. My problem now is that whenever i run my code, halfway through the end appears a debug error saying that i was using a variable(TotalCS) that isn't declared. but it is actually declared. …

Member Avatar for Evilfairy
0
236
Member Avatar for Ranek

Hey there everyone. I wondered if anyone could help me out with writing a simple program that checks through blocks of HTML code replacing specific sections of code within each block of 3 <div>'s. It is basically to make my life easier when I have to edit a website, otherwise …

Member Avatar for Ranek
0
180
Member Avatar for fullarmorzz

please help me. my program is working but not displaying the table but i followed the syntax for the two-dimensional array. how come the program does not display the table? here is the code. :D [CODE] #include<stdio.h> #include<conio.h> main() { int x[5][5],a,j; for (a=0;a<=5;a++) for (j=0;j<5;j++) x[a][j]=(a*4)+j+1; for (a=0;a<=5;a++) for …

Member Avatar for fullarmorzz
0
94
Member Avatar for rotten69

Hi everyone, I am doing a Java course at uni at the moment and it kinda doesn't make you become a real programmer with the confidence that a programmer should have. I really want to program in Java and any language(not python though because it is not a user-friendly programming …

Member Avatar for rotten69
0
191
Member Avatar for debraph

Hello, I'm trying to do a C# code that call, through a 56k modem, a real phone number. The Call works correctly but now I need to know if the person I call answer to the phone or not (it is for an alarm project). To do my call, I …

Member Avatar for debraph
0
344

The End.