64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for ksm092

This doesnt work as it should... [CODE]void renameMonths(string month) { if (month == "jan") { month = "january"; } } int main() { string month; month = "jan"; renameMonths(month); cout << month << endl; }[/CODE] the output is just jan, when it should be january. Thanks in advance.

Member Avatar for Narue
0
252
Member Avatar for vijaybrar

Hi I need help its actually working fine but i don't know how to put a control structure in knowing whether the input is wrong, example when i instruct user to input number it must be less than 100 if not error will show up that is only the last …

Member Avatar for vijaybrar
0
511
Member Avatar for theguitarist

Hello I am very confused with how negative numbers are represented in binary form. They say it is done in 2s complement form. Now won't this 2s complement of a negative number clash with an actual +ve number having the same binary representation? And negation of a +ve number..... We …

Member Avatar for Narue
0
164
Member Avatar for ksm092

This is my code: [CODE] void removeAppointments() { vector <string> newfile; string line; int i; int n; ifstream Appointments; ofstream newAppointments; Appointments.open(DATAFILE); newAppointments.open(newDATAFILE); if (Appointments.is_open() && newAppointments.is_open()) { // Read the file until it's finished, displaying lines as we go. while (!Appointments.eof()) { getline(Appointments, line, '\n'); // getline reads a …

Member Avatar for ksm092
0
195
Member Avatar for mozy1691

am a student developing a programe for a lib but am failing to create new JFrames when buttons are clicked i need help handing in with 3 days

Member Avatar for masijade
0
87
Member Avatar for rahulvramesh

[CODE]#include<iostream.h> #include<conio.h> class test { public: int data1; char data2; test() { cout<<"contrsuctor"; data1=1; data2='a'; } ~test() { cout<<"destrucor"; } void show() { cout<<"data1"<<data1; cout<<"data2"<<data2; } }; void main() { test *ptr; test object1; ptr = &object1; cout<<"\npointer\n"; ptr->show(); delete ptr; getch(); }[/CODE]

Member Avatar for Cross213
0
120
Member Avatar for khentz

Hello, How to reset the properties of the form as well as all of the control properties values when i click a button. Thanks in advanced..

Member Avatar for khentz
0
1K
Member Avatar for ksm092

I am making a program (new to c++) which lets you save contacts and then allow you to list them and remove them. I am lost to how I would number each contact, for example: 1. Sam 21340223 2. Jessica 21020303

Member Avatar for jinhao
0
128
Member Avatar for FriXionX

I have a switch statement set up, with 2 cases (a or v). I could have just done an OR, but decided to practice with switch statements. So far i'm using it to select what letter they type in, then launch the next part of the program depending on the …

Member Avatar for jonsca
0
164
Member Avatar for Simplicity.

Hi All, I want to make the output "u = u + alpha*d_k" at the very end of this code an input, i.e., as an argument of the function "f(u)" at the beginning of the code, in every iteration. Note that I have posted only part of the code which …

Member Avatar for Simplicity.
0
161
Member Avatar for Efficience

I have written this C code in which I'm declaring a variable inside switch body with initialializing it to 10.But when I'm running this code it is printing some garbage value. [CODE]#include <stdio.h> int main() { switch(2) { int x=10; case 1: printf("Case 1: %d\n",x); break; case 2: printf("Case 2: …

Member Avatar for Efficience
0
459
Member Avatar for klenne

Hi, Actually I don't know if my question belongs in this topic or in the VB.net topic. But I'm making a VB.net application with a mysql database and i have to make a trigger but I don't know where I have to use or implement it in my application. I …

Member Avatar for pritaeas
0
248
Member Avatar for FutureDev86

I have to make this program track how much fuel I have used. I have tried and tried, but I can't get it to work... I'm not at all looking for a solution... I just need a nudge/hint into the right direction. [CODE] def main(): choice = 0 ammo = …

Member Avatar for TrustyTony
0
323
Member Avatar for zoraster01
Member Avatar for dottomm

Thank you in advance to anyone who can help this coldfusion noob. What I am trying to do seems easy enough but clearly I am having very serious problems. ;D I am trying to populate a pdf with data from a database. //Here is the page that lists all the …

Member Avatar for jsmall26
0
402
Member Avatar for LloydFarrell

Hi, I have been going round in circles for the past few hours and I need some help please with the following header location. [code]header("location: http://www.websitename/members/securecode/index.php");[/code] I have a login script that works great until i get to line 81 ?? the above header location. here is my script - …

Member Avatar for Kadafiz
0
541
Member Avatar for PinoyDev

Hi! Good day! I am having problem regarding closing the fancy box with an iframe type after succesfull login..I have this code but the redirect parameter seems not executed after fancy box close event...Anybody help me?Thanks! [code=php] echo "<script>parent.jQuery.fancybox.close();</script>"; header("Location: " . $MM_redirectLoginSuccess ); [/code] Thank you!

Member Avatar for PinoyDev
0
430
Member Avatar for ksm092

When I want to access a part of the vector (appointment) it won't allow it, for example simply adding: [CODE]cout << appointment[1];[/CODE] will not work. I also want this vector to be saved to my class (Appointment), so I can later remove elements of the vector. Would I be able …

Member Avatar for VernonDozier
0
250
Member Avatar for rakwel10

Hello, pls help me with my code... I was able to output the database table on my page. It goes for example like this: [B]id | name | etc... ---------------------- [COLOR="Red"][U]01[/U][/COLOR] | john | etc... [COLOR="Red"][U]02[/U][/COLOR] | mike | etc...[/B] The "ID" is a link (a href). Once click, it …

Member Avatar for rakwel10
0
336
Member Avatar for dusktreader

I am having some trouble getting some overloaded operators working correctly with a simple inherited Vector class (numerical vector, not container) The scalar multiply from the base class doesn't appear to be visible to the derived class. Code follows: Base Class Header [code=c++]#pragma once #include <vector> class Base { protected: …

Member Avatar for GreenRiver
0
3K
Member Avatar for ben1996123

I just watched this tutorial: [url]http://www.youtube.com/watch?v=NTip15BHVZc[/url] and tried it myself, but I could not get it to work, I get these errors: [CODE]||=== 15. Placing classes in separate files, Debug ===| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes in separate files\src\testClassFile.cpp|1|error: testClassFile.h: No such file or directory| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes …

Member Avatar for ben1996123
0
1K
Member Avatar for ksm092

I am trying to add a numbering system to a list in a datafile: [CODE] Appointments.open(DATAFILE); if (Appointments.is_open()) { // Read the file until it's finished, displaying lines as we go. while (!Appointments.eof()) { getline(Appointments, line, '\n'); // getline reads a line at a time appointment.push_back(line); cout << i << …

Member Avatar for ksm092
0
96
Member Avatar for plasticfood

i am not saying that all of my jar files are not working. in fact, all of them do work so far except for this one game that i've made. it runs perfectly in my editor, but its jar file will not execute. i checked its MANIFEST.mf file and the …

Member Avatar for plasticfood
0
157
Member Avatar for PratikM

Hey guys, I made a program and i was just wondering how to change the icon because right now all its showing is the application file icon. So Any help is appreciated. Thanks! P.S: I already tried resource hacker, and I probably did something wrong but it didn't work.

Member Avatar for jonsca
0
353
Member Avatar for azamsalam

I am using SQL Server 2005. I have a data from SQL like this. ID ID2 PartNo 75 23921 DENT 75 26145 PLGD 75 26145 PRRP 75 26145 SIST 75 57290 PRMD 75 57290 abc 75 57290 def 75 57290 ghi 75 57290 jkl I need an output like this. …

Member Avatar for dhfg
0
2K
Member Avatar for Simplified

Hi All I have a simple quick question: does anyone have any recommendations on a graphing with C? I've done some graphing in the past with Python using Matplotlib and rather than re-invent the wheel I was hoping that someone might be able to point me in the right direction …

Member Avatar for Simplified
0
158
Member Avatar for DealthRune

I need a PHP messaging system where you can send, recieve, and view the messages you sent from one user to another. If you need my SQL code for the database, just ask :)

Member Avatar for lexayo
0
4K
Member Avatar for MissJava

Hi there, I am supposed to make a Java programme called prize collection My programme is a follow: [code]import javax.swing.JOptionPane; import java.util.*; import java.lang.*; public class PrizeCollection { public static void main (String[]args) { // Declare variables and arrays which will be used in the programme String[] Name = new …

Member Avatar for MissJava
0
121
Member Avatar for felix001

Im currently working on a HTML page to add additional input boxes. I have the following code. Does anyone know how I would go about adding the required vlaues to each of the input boxes, for use later on within php ?? [CODE]<html> <head> <title></title> <script language="javascript"> fields = 0; …

Member Avatar for felix001
0
165
Member Avatar for RikkiUW

Hey all, I am designing a budgeting program, not for any particular reason, and am having trouble with my new budget "wizard". I'm just storing the budget info in an xml file, and so far the program can load and modify info (I've yet to implement saving), but it cannot …

Member Avatar for RikkiUW
0
661
Member Avatar for Srin

I wanted to install a GUI toolkit for python and pyqt looked good but when I install the complete binary on the pyqt site and run designer, I get this error when I try to go to the code [IMG]http://i167.photobucket.com/albums/u154/Final_04/pyqtdesignererror.png[/IMG] Anyone know how to fix it? And if not, can …

Member Avatar for nabla2
0
570
Member Avatar for clyo cleopas

#include <iostream> using namespace std; #include <iomanip> const double minimumFee = 7.00; const double hourlyFee = 1.75; const int numOfCustomers = 12; const int numOfMinsPerHour = 60; void inputAndValidate(int&,int&,int&,int&); void convertToMinutes(int&,int,int); void convertBackToTime(int&,int,int); double calcCharge(int,int,int); int main() { int entranceMinutes,exitMinutes,entranceTimeInMins,exitTimeInMins ; int minutesParked,parkedMinutes,entranceHour,exitHour,parkedTime ; int parkedHours; double charge ,totalCharges; int …

Member Avatar for thines01
0
106
Member Avatar for clyo cleopas

[CODE]#include <iostream> using namespace std; #include <iomanip> const double minimumFee = 7.00; const double hourlyFee = 1.75; const int numOfCustomers = 12; const int numOfMinsPerHour = 60; void inputAndValidate(int&,int&,int&,int&); void convertToMinutes(int&,int,int); void convertBackToTime(int&,int,int); double calcCharge(int,int,int); int main() { int entranceMinutes,exitMinutes,entranceTimeInMins,exitTimeInMins ; int minutesParked,parkedMinutes,entranceHour,exitHour,parkedTime ; int parkedHours; double charge ,totalCharges; int …

Member Avatar for thines01
0
305
Member Avatar for -acir-

i tried to add enum.. not sure why its not working... pls help. [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.io.IOException; import java.io.PrintWriter; import java.util.Random; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * …

Member Avatar for -acir-
0
110
Member Avatar for nerdy9000

I am a beginner to Android programming. I am trying to convert an string(from an EditText widget) to a double Whenever i run the program, it crashes whenever the parseDouble function is used: [CODE]Double.parseDouble( input.getText().toString() ); [/CODE] Does anybody have an idea why parseDouble causes my program to crash and …

Member Avatar for nerdy9000
0
1K
Member Avatar for fortozs

I am new to Python and I'm trying to make a simple updating window. Most suggest I should use wxtimer for the task. I have tried to get it going but it fails. Here is the code without a timer that works for me. I had been using time.sleep in …

Member Avatar for fortozs
0
951
Member Avatar for PratikM

Hey guys, I made a converter program and i was just wondering how to make it run on its own without debugging it or anything. So, Any Help Is Appreciated Thanks! If you want my code: [CODE]#include <iostream> #include <time.h> #include <string> using namespace std; float FTC (float); int main() …

Member Avatar for PratikM
0
275
Member Avatar for arjen

help please..help me in my timer like the time they use in computer shop and when the player is already time out it will alert...[COLOR="red"]the idea like this if the player start 3:00:00 then it will appear in the textbox for the time - in and in the time - …

Member Avatar for codeorder
0
637
Member Avatar for Jeroen van Zijp

I'm trying to make a Menu manager in PHP + SQL. My goal is to save every menu item and where it should link to in a seperate row. Every row has an internal identifier column called 'menu_id'. I also want to add a function to be able to add …

Member Avatar for diafol
0
196
Member Avatar for dantinkakkar

I need assistance in printing out a Quine. I googled it and stuff, but I didn't understand the code snippets I saw. Can anyone explain in a more lucid tone?

Member Avatar for peter_budo
0
128
Member Avatar for dhija22

HI everyone,i am a biginer in java and i need your help...i have write a prgram but i cant execute can anyone help me for execute it the program is : package sensor; [CODE]public class sensor { private String Id; private int Kordx; private int Kordy; private char[] getId; public …

Member Avatar for dhija22
0
415
Member Avatar for rakwel10

can someone tell me how to do this... I have a page that contains reports and information. For this reason, I thought of putting an rtf generator that converts HTML to RTF. I've googled it, found some codes, but I cant understand... Any one here know how to do it? …

Member Avatar for rakwel10
0
300
Member Avatar for heshanm

Hi, I want to validate phone number in my project. I include some validations. Furthermore i want to check whether it exactly contains ONLY 10 digits.nothing more and nothing less.How should i include that? [CODE] if (document.form1.phone_number.value == '') { alert('Please fill in phone number!'); return false; } if(!document.form1.phone_number.value.match(/^[0-9]+$/)){ alert('Please …

Member Avatar for heshanm
0
335
Member Avatar for thompsonSensibl

Hi there, I am not good with Java. Can someone explain this for loop for me please. For a for loop, to my understanding the syntax goes something like, [CODE]for(int i = 0; i < someNumber; i++) { //...some code... }[/CODE] but in this one I have seen, the for …

Member Avatar for peter_budo
0
145
Member Avatar for HASHMI007

[CODE]// bakers.cpp : Defines the entry point for the console application. // /* HEADER USED IN THIS PROJECT*/ #include "stdafx.h" #include<iostream> #include<conio.h> #include<stdlib.h> #include<string.h> #include<string> #include<stdio.h> #include<process.h> #include<fstream> #include<ctype.h> using namespace std; //Classes in this program class Bank { private : long Ac_no; string f_name , l_name ,City; char Ac_type; …

Member Avatar for Süspeñce
0
450
Member Avatar for spawn2004

Hi , everyone, i am new in web design and i have a liitle problem with my registration form.I have one php file which have the html code and the php and anothe with jquery. PHP code is for checking and enter the data in mysql table. The jquery code …

Member Avatar for ddsuresh
0
174
Member Avatar for miss_indie

Sorry for posting again. :| I'm working on this simple evaluation system for our final requirement in this subject. it's working now. my problem is I want to have an error checking ([I]if it's the right term for that[/I]). if they leave one textbox blank? the flow will be, if …

Member Avatar for rajeevbu
0
2K
Member Avatar for naffan

Hi all, Wonder if someone could please lend a hand, I have a courses.txt file which is read into a Course String array I also have a program.txt (A list of 8 courses required to pass the program) There's a menu option to change the Program, however a condition of …

Member Avatar for JamesCherrill
0
216
Member Avatar for markdean.expres

Hi eveyone, I want to create applications for my N81 phone. I am currently downloading Symbian^3 SDK, will this lead me to what I want or nowhere? Please reply on this thread if you have anything to say,...

Member Avatar for peter_budo
0
73
Member Avatar for coroll

Hi all, I want to call a button1 click method inside a close button(which is provided by a form) click of a form. But there is no close button click event of a form. There is only From_closing event and Form_closed events.

Member Avatar for Momerath
0
252

The End.