199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Photomotoz

Hey, guys I think this is a very simple problem and that I just can't get it is due to some gap in my knowledge. Any way, what is wrong with this : [CODE] class A{ private: int value; public : A(int v); }; A::A(int v) {value = v;} //Does …

Member Avatar for StuXYZ
0
98
Member Avatar for kevintse

[code=cplusplus]#include <iostream> using namespace std; #define PRINT(x) cout << #x " = " << x << endl; class Object{ public: Object():i(5){} int i;; }; int main() { Object o; o.i = 5; int* p = &(o.i); PRINT(*p); int Object::* p2m = &Object::i; PRINT(o.*p2m); return 0; }[/code] the two PRINT macros …

Member Avatar for ArkM
0
126
Member Avatar for CPPRULZ

I've been studying enums lately and decided to make a program with it to test the enum syntax and my first one worked. It was: [code=c++] #include<iostream> using namespace std; int main() { enum daysinweek{ monday=0, tuesday=1, }; enum daysinweek enumerator=monday; cout<<enumerator<<endl; system("pause"); return 0; } [/code] It worked perfectly, …

Member Avatar for StuXYZ
0
150
Member Avatar for allang

I put together a simple color chooser and havce one other thing I want to accomplish but can't figure out. I want the individual scrollbar to change color to reflect the amount of that particular color ie red (255,0,0) Also, in playing with this I have realized that it is …

Member Avatar for allang
0
110
Member Avatar for Fouly

Hi all, I'm a beginner at Open Watcom and i'm trying to R/W from and into a file...i used the library "fstream.h" but the scanner shows invalid token... [code] #include <stdio.h> #include <string.h> #include <iostream.h> #include <fstream.h> int main() { ifstream inFile; // object for reading from a file ofstream …

Member Avatar for cikara21
0
190
Member Avatar for Tex_Waco_USMC

I am a fairly new programmer with limited knowledge in C++. I am currently writing a program for my class that involves fractions. I was doing good writing one piece at a time and making it work until the instructor threw a wrench into my plans and asked me to …

Member Avatar for vmanes
0
87
Member Avatar for Se7Olutionyg

[CODE] // Description: This is a computer version of the game hangman, the user // can play against a 2nd player or the computer, and he can enter how many // guesses he gets, // // Start of program // Header file definitions #include <iostream> // Standard input/output #include <string> …

Member Avatar for Salem
0
130
Member Avatar for DemonGal711

Ok, working on a program to find the shortest path between two points. Simple. Now, we are going to be given a list like this to denote the start and end, and then the weight of the lines. [code]A D B C 31 B A 4 C A 12 C …

Member Avatar for DemonGal711
0
149
Member Avatar for nidhi89

i m new 2 programming so could anyone help me or give me a idea 2 how develop examination management system in C wat features should i aad 2 it before making a program of that

Member Avatar for Salem
0
56
Member Avatar for vickzbrit

How do I disable and Enable Menu Items and Sub Items. [code]if(Selected == "drum" || Selected == "guitar" || Selected == "mic" || Selected == "computer" || Selected == "car" || Selected == "hockey" || Selected == "laptop" || Selected == "watch" ) { pCmdUI->Enable(Sort == 1); }[/code] The above …

Member Avatar for vickzbrit
0
1K
Member Avatar for CoolAtt
Member Avatar for c_skyscraper

Hello Everyone, I have a terrible problem with data structures in C. i have defined a structure as below: struct MNT { char label[32],opcode[32],operand1[32],operand2[32]; struct MNT *next; }; typedef strct MNT *MNTABPTR; MNTABPTR mnt_first = NULL; and for allocating memory i used the following sentence: MNTABPTR newnode; newnode = (MNTABPTR)malloc(sizeof(MNTABPTR)); …

Member Avatar for c_skyscraper
0
120
Member Avatar for cutedipti

H! I have to write a program for sorting two dimensional array(e.g. Matrix) without converting it into a single dimensional array or using pointer concept. So, can u please give me any idea for writing this program?

Member Avatar for ArkM
0
103
Member Avatar for stealthmode

Sorry all, this is probably an asked question already, but can't seem to find it. I have designed and uploaded a website for a company. Static pages (3) with a simple form using php to direct the form to one of the companies e-mails. I now need a members log-in …

Member Avatar for stealthmode
0
108
Member Avatar for ihatehippies

Im trying to write a script that can return directions to an address from google. I've looked over urllib for a while and I cannot figure out how to send the information to the server and then retrieve the directions.. any ideas?

Member Avatar for ccandillo
0
280
Member Avatar for drjay1627

I encode a text file using a huffman tree. Which print out to the screen and and output to a file. File only contains the last line that prints to the console. [code]void traverse(string code = "") const { string outputFile = "huffman.txt"; ofstream outfile(outputFile.c_str()); if (child0 !=NULL) { static_cast<huffman_item<dtype> …

Member Avatar for skatamatic
0
182
Member Avatar for Nemoticchigga

Is keil software for programming microcontrollers a free tool, or does it need to be purchased with a license? Thanks.

Member Avatar for Colin Mac
0
104
Member Avatar for KPS

im creating a java program using Jgrasp and im completely stuck on how to apply my random operator to calculate two random numbers? heres my code: //Import Random Generator import java.util.Random; import java.util.*; //Program name class TimesTableTestTimer {//open main public static void main(String[] args) {//Create while loop to restart char …

Member Avatar for Antenka
0
118
Member Avatar for ajorge

Hi to all! I never used Pointer Functions, and now i'm trying to use a C Pointer Function in Visual Studio 2005. But there's a problem... the pointer function isn't working properly... This kind of functions doesn't work in the same way in C and in C++? My pointer function …

Member Avatar for ArkM
0
119
Member Avatar for moerpheus

hey people, I want to develop my own social network. Do you think PHP and Mysql plus Javascript can do the magic?........ Thanks in advance.....

Member Avatar for moerpheus
0
267
Member Avatar for MxDev

I've a simple question, i wonna make a program using access database to store the entered data and making some calculations on it to get the total income per day and per week, how could i backup the old data and save it in a separate database at the runtime …

Member Avatar for dickersonka
0
99
Member Avatar for bastek

Hi, I have a simple code written in MIPS assembly that reads an integer from a user and displays it to the screen. The code is as follows: [code] main: la $a0, in_msg li $v0, 4 syscall li $v0, 5 syscall move $t0, $v0 la $a0, out_msg li $v0, 4 …

Member Avatar for ombadboy
0
19K
Member Avatar for elsa87

hi everyone.. i have a small problem with the below code.. when i execute the program, the output file doesnt print me the unsortedList.ReturnLastItem().Print(); it gives me the following output: the last item in the unsortedList is how can i make it print me the last item? here is the …

Member Avatar for cikara21
0
209
Member Avatar for rayan_au

Hi All, I have a bit detailed question. So, please be kind enough to take few minutes and give me an advice. Currently, we have an ASP.NET based Invoice engine application. It basically handles the customer details with their invoice details. One of our client told us that he cannot …

Member Avatar for a496761
0
95
Member Avatar for hhamdan

i have multiple onchange in two different form and they are in different include files. the thing is when i try to use the first onchange ...it works and it will change the session value but if i start with second onchange it will not work and it says the …

0
86
Member Avatar for Farismkhalid

hello guys, i know all of you are gurus at this as for i am a rookie, i am currently using MySQL 2000 and i would like to retreive information from the database from a certain table via an HTML website what are the scripts that i could run to …

Member Avatar for dickersonka
0
140
Member Avatar for daviddoria

I want to do something like this: unsigned char r[3] = {255, 0, 0}; map<unsigned char[3], int> ColorList; ColorList[r] = 1; But I get the following: error: array used as initializer How else would I set the r element of the map? Thanks, Dave

Member Avatar for daviddoria
0
2K
Member Avatar for Crued

I'm trying to put together a registration form for little league baseball. I'd like to have a form where the parents can enter their information and the information for up to 5 children. I need a separate record for each player instead to one record for each family. So what …

Member Avatar for Crued
0
85
Member Avatar for Prahaai

Good day. I wanted to share with you the code for an application I've created. It can read the number of pages in all the PDF files from one directory. The question I have is this : does it need more optimisation ? Can I make it work faster ? …

Member Avatar for Prahaai
0
4K
Member Avatar for OB_

Hi there, new programmer/python user here. What I'm trying to do, is simulate the rules of a tabletop RPG (not nerdy in the slightest). This is using a 10-sided die. In the game when you roll a 10 the dice "explodes" and you roll it again and add the next …

Member Avatar for Gribouillis
0
78
Member Avatar for cout<<"alias"

Hi there, been having some trouble with a simple program i am trying to write. I'm fairly new to C++, and can't seem to fix the errors im getting. Any ideas or hints would be much appreciated. [code=c++]#include <iostream> using namespace std; int main() { double payrate; double hours; double …

Member Avatar for cout<<"alias"
0
147
Member Avatar for Samudra2008

Good day, I like so many, am new Perl. I am trying to search a file for a string, if found, pass it to an array. I don't think what I have done is the best way of doing things, but I learn by getting scripts to work and them …

Member Avatar for Samudra2008
0
85
Member Avatar for rebeka.six

I need help with joining these two tables: Table1 idx idy --------- one 1 two 2 tree 3 Table2 idy u ------- 1 a 2 b 3 c 4 d 5 e 6 f I want to show rows from the Table1 that have idx=one joined with all the rows …

Member Avatar for rebeka.six
0
137
Member Avatar for Punkis448

Hello all. I am having some questions about a subject. I am running a small social community using SocialEngine and i want to include phpbb3 with an arcade mod or any arcade board that support high scores. My problem is that i do not want my users to re-register into …

Member Avatar for Punkis448
0
184
Member Avatar for mahaboob Basha

i have a jsp it has two fileds..mobileno and password..when i enterd values its storing in DB.But when iam retriving its retriving and comparing only with newly inserted values only.. it is comparing only last inserted values in Db only ..here is my code.. package com; import java.io.*; import java.util.*; …

Member Avatar for peter_budo
0
1K
Member Avatar for anumitadas

I want to fetch data from Mysql database in list box..but it's not happening The code is: [code=php]<?php include("connection.php"); $sql= "select student_age from student_data"; $result= mysql_query($sql); if(!$result) { die('could not connect:'.mysql_error()); } while($row = mysql_fetch_array($result)) { echo "anumita"; ?> <option value="<?=$row[0]?>"> <?=$row[0]?> </option> <?php } ?>[/code]

Member Avatar for TopDogger
0
127
Member Avatar for macokovac

Hello all I need fast answer on this: How i can change(or) reset value ["referalvisits"] to ZERO? let's say that there is some value: for example 23220 I need reset it to zero and count again from zero.. "" [code=php]<th>Referral Visits</th> <td>&nbsp;&nbsp;<? echo $row["referalvisits"]; ?></td>[/code] "" thank you alot I …

Member Avatar for Aamit
0
167
Member Avatar for kevin wood

hope someone can help me with this. i am trying to update records in a mysql db with a new image but i keep gettin errors. i am using a hidden form input to post a variable across to a new page, i can echo the variable out at the …

Member Avatar for kevin wood
0
103
Member Avatar for Aamit

Hi.. I am using downloaded code from google it create frame when we upload image. i am modified that code .. I want like when uploaded new image 1> previous image is deleted or new image is overload on previous image in Same frame but problem is when new image …

Member Avatar for Aamit
0
105
Member Avatar for rickya100

Hi there, So I thought this would be simple and it should be but I can't see what is wrong. Basically I am checking what language has been selected (via a code stored in a constant LANG_CODE) and then loading in a specific swf file. Except that the language code …

Member Avatar for rickya100
0
93
Member Avatar for Whilliam

hello guys, Im trying to understand how fread and fwrite works. My teacher said that these functions can store/output binaries and texts in files. I know how to do it with string. Im confused with floats and integers. I tried to make a program for it but Im getting errors. …

Member Avatar for Whilliam
0
248
Member Avatar for Se7Olutionyg

[CODE]// file: hangman.cpp // name: Kyle Burmark // professor: M. Gelotte // date: 2/26/02 // Description: This is a computer version of the game hangman, the user // can play against a 2nd player or the computer, and he can enter how many // guesses he gets, // // Start …

Member Avatar for cikara21
0
396
Member Avatar for danishbacker

[code] if (window.print) { document.write('<form>Click Here To ' + '<input type=button name=print value="Print" ' + 'onClick="javascript:window.print()"> This Page!</form>'); } [/code] using this code the whole page is printed can I limit the paper size? also can I remove the print header and footer? Thanks in advance.

Member Avatar for essential
0
4K
Member Avatar for vivek_web

wen i try to connect jsp with access i found error showin "no data found" ..how can correct it ? also data is not inserted in my database..my codin is below.. [code=JSP]<% Connection con = null; Statement stmt = null; ResultSet rs = null; String quer = "insert into db …

Member Avatar for ndtreviv
0
181
Member Avatar for cybernaut09

I am creating a login page , where when user enters his username and password the the request is sent to the servlets first and then validation is done in a javabean . If validation results true then user is forworded to another page otherwise he remains on the same …

Member Avatar for stephen84s
0
122
Member Avatar for l1985

Hello I'm making a wabsite with a gridview(so far..) but,when i try to fill with a dataset ...nothing ,i can't see no data and my dataset is never empty ,it contains data .I ran some debugs and the dataset reads correctly from the sql server database here's the code [CODE] …

Member Avatar for l1985
0
113
Member Avatar for compovet

I'm trying to sending Email through my web application from Gmail by using Sustem.Net.Mail.SmtpClient My code is [CODE] string To = "doctor_ofvet@yahoo.com"; string From = "doctorofvet@gmail.com"; string Subject = "The Famous"; string Body = "Hello World"; SmtpClient Client = new SmtpClient(); Client.Send(From, To, Subject, Body); [/CODE] I put this code …

Member Avatar for LizR
0
116
Member Avatar for monkey_king

I've made a program using gcc as a compiler. In my loops I've been using a uint type as the type of my loop variable. But now it seems that some systems doesn't support this type. Can I make a preprocessor conditional that does a #define uint to unsigned int …

Member Avatar for WaltP
0
159
Member Avatar for poggie

Hey all, I need some help with an application which needs to read data into an array using methods and then write it back out into a 5x5 table so i would read int 25 digits say: 0 1 2 3 4 5 6 7 8 9 0 1 2 …

Member Avatar for stultuske
0
144
Member Avatar for sting23

#include<fstream.h> #include<iomanip.h> #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #include<time.h> #include<iomanip.h> //-----------------------------------------------------------------\par \par \par class inventory\par \{\par \tab char name[25];\par \tab int code,copy;\par \tab float cost;\par \tab char stock[3];\par \tab char datestr[9];\par \tab char timestr[9];\par \par \tab public:\par \tab\tab void rdata(void);\par \tab\tab void wdata(void);\par \tab\tab void menu(void);\par \tab\tab void display(void);\par \tab\tab void mainpage(void);\par …

Member Avatar for mrboolf
0
144

The End.