132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for sgw

I just saw someone's program that assigned string this way: [CODE]string x("snow");[/CODE] It seems to work, as I could display the output x as "snow". Is this a legible way to assign strings? How does it differ from [CODE]string x="snow";[/CODE] ?

Software Development c++
Member Avatar for Fbody
0
186
Member Avatar for turrence27

In a question i am required to add every other number starting from the right most side and going left on every other number. I have a code that is almost right as i am led to beleive. the code is: [CODE]#include <iostream> #include <cmath> int main () { int …

Software Development c++ visual-studio
Member Avatar for turrence27
0
2K
Member Avatar for abhimanipal

Hello People, I just came across this code as I was browsing through some C++ problem sets. This code gives compile time error but I am unable to understand the reason. I am C guy and my knowledge about C++ is not that great. So pardon if there is an …

Software Development c++
Member Avatar for sheff_cc
0
129
Member Avatar for Stefano Mtangoo

Hello people, I have two classes everyone with private data. I want only one function from each class to access private data from another class. I have checked "friend" function but It needs the class object as an argument. That is making things complicated on my side and I have …

Software Development c++
Member Avatar for sheff_cc
0
1K
Member Avatar for JHus00

I want to call the input function, which works when I run it, but then I want to display the "temp" and "windspeed" variables in the main function and I don't know how to do this, im looking online at tutorials but im still confused. I guess I shouldn't have …

Software Development c++
Member Avatar for Fbody
0
188
Member Avatar for AnnetteM

Hi, I would like to read data from an .asc file with a six-line file header. I just want the data without the header. I'd like to start at the 7th line and go until the end collecting the data into a single list. Each different data file I'm looping …

Software Development dataset os-x python
Member Avatar for Gribouillis
0
3K
Member Avatar for Hanyouslayer

I have been working on converting this C/C++ Program as an assignment for my x86 assembly class, and for the love of anything good I can't figure out what is wrong. It doesn't have a problem when assembling or linking, but when I run it, it gives me: CS:0576 IP: …

Software Development assembly
Member Avatar for NotNull
0
196
Member Avatar for miskeen

Hello, I've an external/global array that is used every where in my code.[CODE] // global.h file short is_valid[10];[/CODE] I initialize my array somewhere in the code and I want to check if everything works. When I try to print the values of the array, I get segmentation fault. [CODE] // …

Software Development c
Member Avatar for Dave Sinkula
0
60
Member Avatar for DARK_BYTE

Hi I am trying to answer this question for my homework: [QUOTE] Populate a text file EmployeeDetails.txt (for 20 employees) with details of each employee on a single line. Details of an employee will consist of Name, Address, Age and Salary. Write a C++ or Java program to implement an …

Software Development c++
Member Avatar for Clinton Portis
0
110
Member Avatar for FlamingClaw

Author: [I] ================================================================================ Crt Unit Read-Me By: Will DeWitt Jr. (edge@boink.net) Mar 21st, 2003 ================================================================================ BRIEF NOTES AND INFORMATION: This unit was created primarily to support my development of console mode applications under Delphi. I've tested this unit and had it successfully works under Delphi 2, 3, 4, 5, 6 …

Software Development delphi gui ide pascal
0
130
Member Avatar for logicmonster

This is a program that is meant to be a dice game with the computer, and this is what I have so far. I'm trying to make sure that I'm doing it right but I can't compile it to check because of a syntax error near the end of the …

Software Development c++
Member Avatar for WaltP
0
177
Member Avatar for wwsoft

hello , Im creating a top down game. Id like to know what is the formula for moving X and Y values N pixels in a specified direction (0-360) ? [CODE] int x=0; int y=0; int speed=3; // "n" int direction=45; //some formula ... //output x=3; y=3; [/CODE]

Software Development c++
Member Avatar for wwsoft
0
92
Member Avatar for soUPERMan

Hello, im trying to use a function inside another function and getting an error: The function: [CODE]# Function that recieves number of characters and calculate cost of advertising def costAd(numChar): if numChar >= 15: cost = 35.00 else: cost = 35.00 + ((numChar - 15) * 3.55) return cost costAd()[/CODE] …

Software Development advertising python
Member Avatar for soUPERMan
0
178
Member Avatar for prockaz

Program not running I'm not sure of he problem [code]//Employee.h #ifndef CLASS_H #define CLASS_H class Employee { protected : char *firstName; char *lastName; public: Employee (); Employee ( char, char ); //accessors //retrieve const char *setfirstName (char); const char *setlastName (char); //mutators //return const char *getfirstName (char); const char *getlastName …

Software Development c c# c++ oop
Member Avatar for thomas_naveen
0
307
Member Avatar for aallan

Hi, I wish to create a very simple GUI for my C++ code I have written a simple C++ program using Microsoft Visual C++ Express. The details of the program functionality are not really important. Currently the user enters a number (1-5) on the command line and presses enter. A …

Software Development c++ gui user-interface
Member Avatar for Stefano Mtangoo
0
438
Member Avatar for Stefano Mtangoo

Sorry guys, I know it is not C++ specific, but Wikipedia confused me. I have devoted a little time to look at programing tools and little on their innner workings. This term have boggled my mind. So any explanation on what this animal is? Thanks

Software Development c++
Member Avatar for Stefano Mtangoo
0
85
Member Avatar for wtzolt

Hi, What I'm trying to do is to write a script which would open an application only in process list. Meaning it would be "hidden". I don't even know if its possible in python. If not, there has to be a function would allow for a program to be opened …

Software Development delphi python
Member Avatar for vegaseat
0
6K
Member Avatar for The Pobo

Hey, I'm a student with rudimentry knoledge of VB6 and I've a college project where I have to develop a blackjack game. Unfortuanately I've a problem with the method I call the cards I was wondering if any of you would be able to shed some light on the problem. …

Software Development visual-basic
Member Avatar for The Pobo
0
220
Member Avatar for vedmack

Hi i have xml file with nodes that could hold any type of input: for example XML code: <Code>1.2.3</Code> <name>John</name> </Employee> <Code>11.2.4</Code> <name>John</name> </Employee> <Code>2.3.7</Code> <name>John</name> </Employee> OR <Code>a.1.5</Code> <name>John</name> </Employee> <Code>a.2.1</Code> <name>John</name> </Employee> <Code>c.4.2</Code> <name>John</name> </Employee> The problem is that i can get any type of input Im looking …

Software Development xml
Member Avatar for vedmack
0
122
Member Avatar for anandmanole

While developing program, i made six to seven text boxes to add the data in mdb database. All the data are properly added to the the database but for presentation purpose i have to show all these in one row & one column only. Ex: Textboxes for address: 1) Flat …

Software Development visual-basic
Member Avatar for kinwang2009
0
95
Member Avatar for rohini.vangury

I want to display a screen as soon as the CD(or pendrive etc.) is inserted into the users computer and on clicking a button on the screen the setup project gets installed(one click insttallation) ... just like how visual studio gets installed with flash pics moving on the right hand …

Software Development flash visual-studio
Member Avatar for Jadooo
0
89
Member Avatar for Cristofor

Hello, I just start to learn c++. what I'm using is visual c++ express edition. here is the source code: --------------------------------------start [CODE]#include <iostream> using namespace std; template <class T> class pair { T value1, value2; public: pair (T first, T second) { value1=first; value2=second; } T getmax (); }; template …

Software Development c++ visual-studio
Member Avatar for Cristofor
0
1K
Member Avatar for techie929

// error: expected constructor, destructor, or type conversion before '*' token *** Error code 1 make: Fatal error: Command failed for target `bst.o' [CODE] class BinarySearchTree { private: int count; int n; struct tree_node { tree_node* left; tree_node* right; char data[1000]; }; tree_node* root; public: BinarySearchTree() { root = NULL; …

Software Development c++
Member Avatar for mitrmkar
0
112
Member Avatar for halfnode

[CODE]System.out.printf("%-10s \t %8d\n",name[i],stationA[i],getStationScore(stationA[i]),stationB[i],getStationScore(stationB[i]),stationC[i],getStationScore(stationC[i]),award[i]);[/CODE] hi all, i'm finishing up on this assignment of mine and can't figure out how to format my output correctly. the correct format should be Name Station Station Test A B A b but so far i only been able to manage to get Name Station Station …

Software Development java
Member Avatar for halfnode
0
113
Member Avatar for gangemia

I have a text file that contains Road Name types paired with their abbreviated form. For example: ... Avenue,Av Road,Rd South East,SE Terrace,Tce ... How do I a create a dictionary variable from this CSV file in python 2.5.1 so I can get it in this form? {...'Avenue': 'Av', 'Road': …

Software Development python
Member Avatar for jice
0
236
Member Avatar for SearchDS

Hello I have been trying to make a function that can send the output data or any text to a network printer, I read many articles/posts about it but nothing is working, have been looking for almost a week... Whenever the program tries to use the printer function, it either …

Software Development api c++ printer windows-api
Member Avatar for SearchDS
0
2K
Member Avatar for nvishwas

I need transform the following XML to CSV. Can some one suggest how do i write an XSLT to transform. XML is <Transaction TransactionID="60" EventDate="2009-08-17"> <VehicleBuilt InstallationType="factory"> <Vehicle> <Receiver RSN="489823"> <Module> <AddressableElement ESN="99409230923"> <Capability Type="Audio"> <Subscription> <SalesCode>DCC12MO</SalesCode> <Type>Audio</Type> </Subscription> </Capability> </AddressableElement> <AddressableElement ESN="12192019"> <Capability Type="Traffic"> </Capability> </AddressableElement> <AddressableElement ESN="1209010290192"> <Capability …

Software Development audio xml
Member Avatar for xml_looser
0
682
Member Avatar for Peric

I don't have any experiance in this part so I really need someone's help to get start. I have setup for my application in VB.NET...what i need to do (want to do) is next... -create/restore a database that I use for that application (I have database in MSSQL). Maybe I …

Software Development asp.net mssql vb.net
Member Avatar for Peric
0
764
Member Avatar for RooiBaard

Good day. I am attempting to write a C++ Program than must open a text file with random caharacters and then convert these characters into readble text. It must also be able to do the reverse Example like: If the text file has "%&^#)@!#@" It should convert that into "Hello …

Software Development c++
Member Avatar for vidit_X
0
125
Member Avatar for tapas.chand

[CODE] [B]Hi there I am using several insert statements in a method in Java. If the connection fails in between I want to roll back the inserted rows. I cant use [COLOR="Green"]con.rollback()[/COLOR], because there is no connection. How to handle such situation? Thanks in advance.[/B][/CODE]

Software Development java
Member Avatar for tapas.chand
0
76
Member Avatar for noey699

I am designing a artificial life simulator atm and it would be very useful if I could pass any statement as an argument. For Example. [CODE]LoopStatement(X += 2,50)//loop statement 50 times //or LoopStatement(X += 2 * Speed,75)//loop statement 75 times[/CODE] I know the for loop has something like that. Also …

Software Development c++
Member Avatar for timtaylor
0
91
Member Avatar for logicmonster

I have a program that a friend wrote for me in Java, however I'm trying to put it in C++ and I don't know Java myself. Does anyone know somewhere that I can get it translated? Or maybe someone who has time to translate it themselves? It all looks vaguely …

Software Development c++ java
Member Avatar for javaAddict
0
187
Member Avatar for clutchkiller

[code] #ifndef BASE_H #define BASE_H class base { public: base(); struct baseInfo { int SlotCount[4]; }; private: protected: }; base::base() { } #endif [/code] This is my header file, but how do I access the struct and its members through an object of the base class(through main)? I cant find …

Software Development c++
Member Avatar for clutchkiller
0
94
Member Avatar for santiaguinho15

Sorry if this sounds silly but i am having a hard time understanding what "n" is when talking about big-oh. I know "n" is the data size but what does it really mean. Like in: public static boolean isArrayOver100(String[] args) { 2 if (args.length > 100) 3 return true; 4 …

Software Development java
Member Avatar for BestJewSinceJC
0
106
Member Avatar for drewpee

Im trying to create a report that only includes records that was created between to [B]Date Variables[/B], [B]dateTo[/B] and [B]dateFrom[/B]. There are three combo boxes used to get the values for the two dates. Here's the code I didn't include the select case for the month(in string) to be converted …

Software Development sql visual-basic
Member Avatar for drewpee
0
169
Member Avatar for MJaske

Hello everyone. Home help = homework help :) can't change it now I'm running into an error, expected initialize before "int menu()" I have been playing around with it for a bit but I have not figured out how to get rid of the error. When I think I got …

Software Development c++
Member Avatar for thomas_naveen
0
160
Member Avatar for jallan2010

Sir, Please anybody help me while I am inserting the data through textbox of the selected item of the list box I want the when the user will input the data into textbox and then pressing the insert button the the selected item of list box (selected item only color …

Software Development vb.net
Member Avatar for jallan2010
0
143
Member Avatar for corby

any help would b greatly appreciated for the following how do i modify this to output the date in multiple formats: a)DDD YYYY MM/DD/YY June 14, 1992 b) use overloaded constructors to create Date objects initialized with dates of the formats in part (a). c) create a date constructor that …

Software Development c++
Member Avatar for corby
0
159
Member Avatar for jallan2010

Sir, I am using 6 textboxes and three button one for insert data second for update and third for delete the data while inserting and updating the record it generate an error i.e. "Data type mismatch in criteria expression" in the backend i.e in MS Access I am using this …

Software Development dataset vb.net
Member Avatar for jallan2010
0
70
Member Avatar for cyberguy007

Using the example of 10, all the numbers from 1 to 10 are initially in the game. Suppose the user chooses 9; 9 is added to his score. The Tman gets 1 and 3 since these are exact divisors of 9; the Tman’s score is now 1 + 3 = …

Software Development c
Member Avatar for anup375
0
90
Member Avatar for FotG2

I have a project set up using a JLayeredPane with a number of JLabel objects. Some are gray images, and others are images of cards. The cards are drag-able, but I'm trying to make them so they can only be dropped onto the blank spots, if its not one of …

Software Development java java-swing
Member Avatar for FotG2
0
118
Member Avatar for nitinG123

please quick reply! i have a problem that when a record is in the database table then it returns the [B]monthlyBalance[/B] float value otherwise return 0.0 float value. I am using stored proc for this.please help [B]C# Code[/B] [code] conn.Open(); SqlCommand cmd = new SqlCommand("monthlyFees", conn); cmd.CommandType = CommandType.StoredProcedure; //cmd.CommandText …

Software Development c# session
Member Avatar for kvprajapati
0
160
Member Avatar for solomon_13000

I created the first package inside the directory C:\test\eugene\scjp containing the following source code: [CODE] package com.test.eugene.scjp; public class SuperClass { private String name; public SuperClass(String name) { this.name = name; } protected String getName() { return name; } } [/CODE] Then I created the second package inside the directory …

Software Development java
Member Avatar for solomon_13000
0
116
Member Avatar for TobbeK

Can anyone provide a quick solution for INSERT the entire excel sheet into a access database. This is a click button event that just opens a excel sheet in a windows form. What I like to see is some example how to INSERT the same excel data into a access …

Software Development dataset microsoft-access open-source
Member Avatar for TobbeK
0
288
Member Avatar for hwlibra083

I think I'm semi-close to a solution, but it's just not happening for me. I'm having trouble populating my dynamically allocated multidimensional array with data from a text file. Here's what I have: [CODE]#include <stdio.h> #include <stdlib.h> #define MAXLINELEN 18 FILE *getOpen(); int main() { FILE *inFile; // Declares inFile …

Software Development c
Member Avatar for hwlibra083
0
506
Member Avatar for asha2009

I am writing an output stored procedure that i access using c#. I am trying to print the output values from the stored procedure. [code] using (SqlConnection connection = new SqlConnection(connectionstring)) { connection.Open(); SqlCommand emailcmdsql; emailcmdsql = new SqlCommand("returnemail", connection); emailcmdsql.CommandType = CommandType.StoredProcedure; SqlParameter paruser = emailcmdsql.Parameters.Add("@user", SqlDbType.VarChar); paruser.Value = …

Software Development asp.net sql
Member Avatar for kvprajapati
0
161
Member Avatar for pankajpriyam

Hi, I have tried to send email through python code the code is - import smtplib from email.MIMEText import MIMEText #try: s = smtplib.SMTP() s.connect('') # I have given server name of email s.sendmail("","","test") # i have given from user and send user print "Succesfull" s.quit() #except: # print "Error …

Software Development email python
Member Avatar for jcao219
0
159
Member Avatar for konata_89

//help me i dont know what wrong with list function [code] #include <stdio.h> #define MAX 10 struct book{ char title[81]; char author[71]; char category[31]; }; int main() { struct book library[MAX]; int menu(void); struct book add(void); int list(struct book,int); int choice, count = 0; do { choice = menu(); switch( …

Software Development c
Member Avatar for konata_89
0
129
Member Avatar for vincenzorm117

Okay I've been working with printf for a while on C and I have been trying to use some of the backslash commands such as: \b = backspace \r = moves the cursor to the beginning of the line For some reason they don't seem to work on xCode. 1. …

Software Development c
Member Avatar for nezachem
0
100
Member Avatar for techie929

//when I delete root node from bst the below code is showing segmentation fault,Please tell where should I change the code [CODE] void BinarySearchTree::remove(char* d) { //Locate the element bool found = false; if(isEmpty()) { cout<<" This Tree is empty! "<<endl; return; } tree_node* curr; tree_node* parent; curr = root; …

Software Development c++
Member Avatar for VernonDozier
0
96

The End.