132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for alwayshere

#include<iostream> #include<string> #include<stdio.h> using namespace std; int main(){ char s[100]; cout<<"enter the string :"<<endl; gets(s); //memcpy char a[100]; memcpy(a,s,strlen(s)+1);//here if we decrease bytes to be copied to a value less than length of s i.e.(strlen(s)), then s is getting destroyed ...some garbage value is coming cout<<" a : "<<a<<" s …

Software Development c++
Member Avatar for dougy83
0
130
Member Avatar for Sh13

Hi, I am supposed to read data from an input file with following information 16 //number of destinations// Baltimore //origin city// MD //origin state// Lewes //destination state// DE //destination state// 117.0 //miles b/w previous location and and this one// 160 //estimated driving time// Ferry //place to visit in that location// …

Software Development c data-structure file-system
Member Avatar for jephthah
0
94
Member Avatar for lianaconda

I'm a little confused about empty arrays. I'm supposed to write code for a function of type boolean that returns whether an array is empty or not. This function is a part of a class called Sequence, and takes no parameters. Earlier in the code, I included a typedef so …

Software Development c++
Member Avatar for lianaconda
0
145
Member Avatar for Quintillus

I've just started trying to learn how to implement Windows API calls in VB, as the graphics in VB themselves seem to respond rather slowly no matter what computer I run them on, but ran into a couple problems. The graphics at first wouldn't appear until I went over each …

Software Development api visual-basic windows-api
Member Avatar for Quintillus
0
133
Member Avatar for sicantik03

hey guys I need you help, I'm new comer in here but I hope this can help me. I'm writing a code that can read the file (such a story or newspaper) then the identifythe story if that story has a itemY in it the it will print +1 otherwise …

Software Development python xml
Member Avatar for woooee
0
141
Member Avatar for killingcheese

I know that frets on fire was made with python, but a question i have had was whenever you save something in python idle it is a .py, and you cant run them unless you have python (and if they do, they can just edit your program) installed, but how …

Software Development python
Member Avatar for jaux
0
120
Member Avatar for Moporho

I am trying to write a function that will read one value of an array. I must prompt the user for an index and then read the its value. I am having a horrible time and need help. [code] // read_one_value(A, n) prompts the user for an index i and …

Software Development c++
Member Avatar for Moporho
0
153
Member Avatar for leroi green

Hey all, I am trying to display a message asking if the user is sure that they want to close just before closing. Here's what I've got...and it's only telling me that there's something wrong with the word "Message" after the MessageBox.Show part [code] Private Sub xExitButton_Click(ByVal sender As System.Object, …

Software Development visual-basic
Member Avatar for Jx_Man
0
79
Member Avatar for zaigtahir

Hi All! Im creating a java web application. I am finding a very little information on making forums/blogging/chatting application with java. There is plenty of stuff that uses php/mySQL. Should I learn php, or how to use java to interact with php, or are there tutorial, books or other sources …

Software Development java
Member Avatar for zaigtahir
0
72
Member Avatar for hsma

I am currently working on a mini project for my class. the project is designing a game called etch n sketch. you first etch out a map then quit the game after youre done. then sketch the etch you just created. the problem im having is the scoring system. score …

Software Development c++ ios
Member Avatar for vmanes
0
125
Member Avatar for valorien

Hi everyone, Just started programming in Python and iI'm already starting to like this language very much. I have a problem with a program I wrote last night - I'm trying to ping a certain host using [CODE]os.popen("ping xxx.xxx.xxx.xxx"[/CODE] and then read the %errorlevel% from my system using [CODE]result = …

Software Development python
Member Avatar for Ene Uran
0
1K
Member Avatar for ChrisRiv91

Hi, I'm new to these forums. I've been working with java in school, but I can't stand the language. So I've been working with python and find it's very easy to understand, and I actually enjoy working with it. So just for fun I've been working on a pretty basic …

Software Development python
Member Avatar for Ene Uran
0
864
Member Avatar for bballa99

Game: Ragnarok Online Emulator: eAthena Code: C Programming SVN: [url]http://svn.eathena.ws/svn/ea/[/url] Okay so I am trying to create a mod for this game. It requires a source code edit to get it working, but I can't seem to make it work. There is this pet system called homunculus, and I am …

Software Development c
Member Avatar for jephthah
0
84
Member Avatar for Drezta

i'm practicing my use of functions at the moment by writing a program to convert pounds to euros and vise versa but when i try calling the functions that do the converting i get a load of 'expected primary-expression' errors. what dose that actually mean because i'm not really sure …

Software Development c++
Member Avatar for Drezta
0
196
Member Avatar for yazooney

Hi, I'm not sure there is an answer to this question, but here goes. I have a program written in c++ (compiled in windows using devC++) and I can run dos commands easily using the "system function". I can also launch the cygwin bash shell by using this function. Obvously, …

Software Development c++
Member Avatar for dougy83
0
141
Member Avatar for SofMy

I can't run the programme, please assist to check the error. Thank you in advance for your assistance. Question: 1. Develop an application program that creates a list of integer test score value in an array, sorts the array in increasing order and searches it for a test score value. …

Software Development c c# c++
Member Avatar for Salem
0
216
Member Avatar for kartouss

Hello, I am using a code to generate random numbers upto 32 char... The problem is that i want to display the 32 characters each randomly because the code is displaying the same char 32 times and i want to get the 32 chars generated randomly... The code is:- [code=c++]#include …

Software Development c++
Member Avatar for kartouss
0
159
Member Avatar for swetha bandaru

I want to call a shell script from java.I have searched in many java related web sites but I did not find the correct answer.Can anyone please help me out with this problem. plzzzzzzzzzzzzz thank you!!

Software Development java
Member Avatar for jwenting
0
113
Member Avatar for varsitygirl_13

Hi, I have this factorial function that I have working just great, but I am not really sure how I am supposed to print the local variable and the recursive call parameter. Any help would be greatly appreciated! Thanks. [code=cpp]#include <iostream> using std::cout; using std::endl; #include<iomanip> using std::setw; unsigned long …

Software Development c++
Member Avatar for varsitygirl_13
0
161
Member Avatar for hostintruder

Hello friends , I got an important coursework to submit . Let me explain, the coursework consist of a file .. which we must sort, search and we must event create a y-sort algorithm. After much struggle, i was able to use the stringtokensier to input the data from the …

Software Development algorithm c++
Member Avatar for hostintruder
0
109
Member Avatar for Lensva

works, allows entering a user selected amount of strings, however when i try to display, it displays only the last string, not the whole 'database', whatever you'd call it :) the main question is what is wrong and also, is there any way to not to ask a user to …

Software Development c++
Member Avatar for Lensva
0
109
Member Avatar for Yogesh Sharma

In Vb we can connect to all the databases like SQL 2000/SQL 2005,Oracle,Access. Out of the given databses we can connect to which databases. Secondly,told me dat if I want to connect to SQL-any version(2000/2005), To connect to the database i go to Control Panel-->Admintrative Tools-->Data sources(ODBC)-->ODBC Data source Administrator …

Software Development oracle visual-basic
Member Avatar for choudhuryshouvi
0
145
Member Avatar for sonia sardana

Dim i as integer=10 dim j as integer=20 In the above two statements, y the error is coming...How can we initilase the values to the variables???

Software Development visual-basic
Member Avatar for choudhuryshouvi
0
214
Member Avatar for jcato77

Hello, The following is background on my assignment "Modify payroll program so that it uses a class to store and retrive the employee's name, hourly rate and the number of hours worked. Use a constructor to initialize the employee information, and a method within that class to calculate the weekly …

Software Development java
Member Avatar for K504K
0
1K
Member Avatar for marquis1431

how do i keep track of the values entered so far so that i can get hte average in the display grade function? i.e. all scores entered so far... [code] #include <stdio.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 #define SENTINEL -1 int getGradeValue(int, int); void displayGrade( int, char); …

Software Development c
Member Avatar for jephthah
0
95
Member Avatar for BBustos

My code requires the validation of a string that starts with two letters and ends with six numbers. So, an example would be [B]br474897.[/B] This is what I got so far: [code] bool GetNID(char buf[]) { int i= 0; int length; bool valid = false; cin.getline(buf, 30); length = strlen(buf); …

Software Development c++
Member Avatar for vmanes
0
128
Member Avatar for alexhkleung

I can't identify the problem can somebody help me? [B][COLOR="Green"] objects.h (abstract base)[/COLOR][/B] [CODE=C++]#ifndef objects_h #define objects_h #include "colorScreen.h" #include "maincontrol.h" #include <ctime> #include <string> using namespace std; class objects { public: virtual ~objects(); virtual void print(const MainControl &inMain)const =0; protected: objects(); objects(const int& inX, const int& inY,const int&inScore); ... …

Software Development c++
Member Avatar for alexhkleung
0
307
Member Avatar for alexhkleung

hi all I'm trying to read a document char by char my question is how do I read the spaces as well? Thank you!

Software Development c++
Member Avatar for alexhkleung
0
121
Member Avatar for BBustos

I cannot figure out how to validate a string so that it accepts both uppercase and lowercase letters as in a name. Here is the code: [code] bool GetString(char buf[]) { int i; int length; bool valid; cin.getline(buf, 30); length = strlen(buf); for (i = 0; i < length; i++) …

Software Development c++
Member Avatar for BBustos
0
124
Member Avatar for cyberman111

HEY, I am new at this but I am in a middle of an excercise for an online class I am taking and I am doing a exercise and I am stuck. the instruction are as follow : write a shell script that will take information from 2 fles and …

Software Development shell-scripting unix
Member Avatar for Impact4ever
0
153
Member Avatar for shadwickman

Hi, I was wondering if it's possible to call a function using a string that is the exact same as the name of the function. Here's an example in which I wanted to make 4 bitmap buttons using a for loop, and the event bound to each one would be …

Software Development python
Member Avatar for shadwickman
0
160
Member Avatar for samush

I have a problem with unsigned long long int's. I'll tried to do a function wich calculates the factors of an integer. It worked fine with int, but when an tried with unsigned long long int the % and <= operation failed... here is the surce code for the function …

Software Development c
Member Avatar for samush
0
150
Member Avatar for kse989

I need help writing code for my print function in a linked queue adt [B]queue.h[/B] [CODE= CPP] template <class ItemType> // record type for nodes on queue struct NodeType { ItemType info; NodeType* next; }; template <class ItemType> class QueueType { public: QueueType(); QueueType(const QueueType &); // Copy constructor ~QueueType(); …

Software Development c++ queue
Member Avatar for Ancient Dragon
0
186
Member Avatar for complexcodes

I have working version of code but mu ostream<< function should print data acoording to the row and column specified. Here is the codes :- [CODE]// // 4/11/2008 // This is a header file of Array2D class which stores 2D arrays #ifndef ARRAY2D_H #define ARRAY2D_H #include <iostream> using std::ostream; using …

Software Development c++
Member Avatar for vmanes
0
118
Member Avatar for code12

I'm having problem with this code. Here's what I'm trying to do. I want the user to enter the firstname, last name of the person whom he wants to delete from the phonebook. then I try to compare the data entered by user with the names already stored on phonebook. …

Software Development app-store c++ ios
Member Avatar for code12
0
135
Member Avatar for kartouss

Hello, I am calling a c++ dll in vb... Everything is working fine.. Just i am unable to write the vb code in order to perform the require action... Code for calling the c++ dll in vb [code=visual basic 6]Private Declare Function do_encrypt Lib "AES.dll" (ByVal text As String, ByVal …

Software Development c++ visual-basic
Member Avatar for kartouss
0
179
Member Avatar for Jon Jon

Hi, I want to be able to use std stream objects to manipulate files, but some of the files are too big. I want to be able to do the folowing: >int64_t fileSize; >strm.seekg(0,ios::end); >fileSize = static_cast<int64_t>(strm.tellg()); >cout<<"File size is "<<fileSize; This code will output -1 if the size of …

Software Development c++ file-stream ios
Member Avatar for Ancient Dragon
0
82
Member Avatar for Google Spider

Hello, I am on Linux Mint and just installed Netbeans to get started with Java programming. I got these errors while starting the IDE for the first time: [url]http://i268.photobucket.com/albums/jj17/Google_Spider/netbeanswarning.png[/url] [url]http://i268.photobucket.com/albums/jj17/Google_Spider/netbeanswarning1.png[/url] I don't know what these errors mean. When I started the IDE for the second time, I got no errors. …

Software Development ide java java-netbeans
Member Avatar for Jens
0
162
Member Avatar for esmeco

Hello! I need to implement a set greater than and a branch less or equal in my 16 bit ALU design,but I'm having many difficulties. I know that in a set greater than a>b equals a-b>0 ,but I don't know how to work out from that and implement it in …

Software Development assembly
Member Avatar for Colin Mac
0
99
Member Avatar for usaxray25

Hey guys-- I have been lurking on here for some time as a C++ student. I have a project to complete using cstring and strcpy() as a function within a "simple" program. The psedocode goes as follows: --program accepts 2 string array inputs(using getline) 40 total chars for str1 and …

Software Development c c# c++
Member Avatar for usaxray25
0
147
Member Avatar for shadow_shooter

What I'm trying to do is creating a structure array and pass it to a function. My function takes it as a pointer. But I'm having lots of errors which makes me mad. My deadline is approaching and still I've been trying to sort out what the problem is (for …

Software Development c
Member Avatar for Aia
0
280
Member Avatar for edek

I have (in main()) something like: [CODE=C]int toChild[2], fromChild[2]; pid_t pid; //Creating pipes: if(pipe(toChild) != 0){ return 1; } if(pipe(fromChild) != 0){ return 1; } //Forking: if((pid = fork()) == -1) return 1; if(pid == 0) {/* CHILD */ close(toChild[1]); close(fromChild[0]); //create streams: (they are not used in this example) …

Software Development c file-stream
Member Avatar for edek
0
109
Member Avatar for leroi green

hey guys, i'm working on this assignment in where I have to take a For...Next Loop and turn it into a Do While Loop. I think I've kinda got the coding down but when I try to calculate the rates the program freezes up. I got the code here, any …

Software Development visual-basic
Member Avatar for leroi green
0
135
Member Avatar for anbuninja

#include <cmath> #include <ctime> #include<iostream> using namespace std; int main() { srand (time(0)); int c1, c2, c3, c4, guess, guess2; c1 = 1 + rand() % ( 9 - 1 + 1); c2 = 1 + rand() % ( 9 - 1 + 1); c3 = 1 + rand() % …

Software Development c++
Member Avatar for localp
0
132
Member Avatar for shadow_shooter

Hi, I want to scan a word from the user and store it in a char pointer. But I couldn't do it. The thing I just want as the following: char *word; scanf("%s",word); but, it doesn't work... please help for this simple problem. it sounds a bit noob, i know...

Software Development c
Member Avatar for Salem
0
2K
Member Avatar for nelledawg

Hi guys, I've got the code all written but there are a ton of runtime errors that need to be fixed, mainly with calculations and inputting data into the array. I also need to use pointers when referencing the scores array, and I cannot for the life of me get …

Software Development c
Member Avatar for Aia
0
234
Member Avatar for flash121

Hello, I have a class called personalAccount (which is a derived class from another class, but i dont think this will matter in this case), which should have a static array of chars, but i keep getting an error int my current default constructor and i cant seem to find …

Software Development c++
Member Avatar for flash121
0
142
Member Avatar for teffie

Hi, Im new to these forums and i need help with this application. Application Requirements In this application you are to create a Three Shells Game. In this game there are three cups or shells that are upturned. For each new game the pea is placed at random under one …

Software Development asp.net c c# c++ microsoft-access session
Member Avatar for JerryShaw
0
105
Member Avatar for lostforever

hi everyone i have TURBO C++ 4.5, can i compile my graphics program on it? if yes then how? if also possible then do suggest some good tutorials or books to learn graphics in C++.:confused:

Software Development c++
Member Avatar for lostforever
0
78
Member Avatar for Ben10

Hello everyone! I need a C++ program that stores the results of product table from 1 to 10 in two-dimensional array... what i did : [code=c++]#include<iostream.h> void main() { int a[5][2],result; const int k=1; for(int f=1;f<=10;f++) result=k*f; for(int i=0;i<5;i++) { for(int j=0;j<2;j++) { a[i][j]=result; cout<<"a["<<i<<"]["<<j<<"]="<<a[i][j]<<endl; } } }[/code] BUT the …

Software Development c++
Member Avatar for Ben10
0
88

The End.