132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for sweeya

Hi i am trying to understand manipulators. Can someone explain what is happening here [code=C++] for (int i = 0; i < n; i++) { cout << setiosflags(ios::left) << setw(15) << item[i] << setw(8) << setprecision(0) << code[i] << setiosflags(ios::right) << setw(8) << setprecision(2) << setiosflags(ios::fixed | ios::showpoint) << cost[i] …

Software Development c++ ios
Member Avatar for grumpier
0
193
Member Avatar for sweeya

Hi, I have given only some part of the code related to my problem. I have problem while compliation. I have the problem in the constructor of the class RMstore. i Get the following compilation error rmremote_server.cpp: In function `int main()': rmremote_server.cpp:196: error: no matching function for call to `RMStore::RMStore(std::string)' …

Software Development c++
Member Avatar for ArkM
0
127
Member Avatar for Neo7

Hi everybody!! I would like to save a text file in Shift-Jis format but by default the file is always save in UTF-8. I'm using fopen, fput and fclose to create and work with that file, but I don't think that there is any parameter for those functions which can …

Software Development c debian file-system
Member Avatar for Neo7
0
1K
Member Avatar for Manutebecker

What I want to do is make a grading system. There is a vector for schools and classes and students, all of these which have their own class, derived from a class called system. [CODE]class System{ School * p; //School Pointer vector<School>sSort; public: //Splash Screen Function void Splash(); }; /*-School …

Software Development c++
Member Avatar for Manutebecker
0
105
Member Avatar for randr

How do I display multiple questions per day? Also, I am using Visual Studio 2005 and am using a database to retrieve the data. This is the sample code: [code] private string GetCurrentQuestion() { string str = ""; DataAccess da = new DataAccess(); DataSet ds = new DataSet(); da.Connect(); ds …

Software Development dataset visual-studio
Member Avatar for randr
0
190
Member Avatar for wookinhung

Umm, I'm a newbie in VB6, so I am currently facing the procedure being too large during the run of the program. For example: If txt6 > 0 Then lblItem6 = "W6~ Jane Doe" lblItemprice6 = "9.00" lblItemquantity6 = txt6 lblTotal6 = TotW6Price ElseIf txt7 > 0 Then lblItem6 = …

Software Development visual-basic
Member Avatar for QVeen72
0
113
Member Avatar for Hrothgar

and i try use module random... >>> print random.randint(0,10) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'random' is not defined that's my version... Python 2.5.2 (r252:60911, Aug 1 2008, 00:37:21) [GCC 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]] on linux2 Type "help", "copyright", "credits" or …

Software Development python
Member Avatar for Stefano Mtangoo
0
175
Member Avatar for tomtetlaw

I'm learning c++ at the moment, and i just learnt about classes, so i decided to make a text game with a badguy and player class, and i was wondering how to refer to other classes variables(like this.health) from other classes. and wether you have to create an instance of …

Software Development c c# c++
Member Avatar for sid78669
0
184
Member Avatar for DenisOxon

Hi Everyone, Has anyone accessed USB ports from VB5. I support a major realtime program which controls equipment. Currently the equipment is connected to PC via serial ports. My customer is developing new hardware and has decided to connect it via USB port. So two questions 1) has anyone controlled …

Software Development visual-basic
Member Avatar for DeeVee
0
332
Member Avatar for alan72

Does anyone have any code or links that shows how to interact with Web Pages with VB6? I'm trying to find button/image files (.gif, .jpeg) within the HTML and have VB send a command to press that button with code. I read a lot about Web Browser Control, but can't …

Software Development image java visual-basic web-browser
0
58
Member Avatar for serkan sendur

i have also similar problem with getline : [CODE]int Books::InsertBook() { string authorName; cout << "id_code :" << endl; cin >> bookrec.id_code; cout << "info_title :" << endl; cin >> bookrec.info_title; cout << "author :" << endl; getline(cin,authorName); int authorID = train_Author::s_add_author(authorName); if(authorID==0) { cout<< "Operation cancelled!" << endl; return …

Software Development c++
Member Avatar for serkan sendur
0
2K
Member Avatar for dseto200

Created a program random words with a list. When I run the program it will output duplicated items. How do I prevent that. Is there a special command to prevent that? [code=python]import random # random choice from a list for i in range(6): print random.choice (["abacus", "biology", "chemistry", "dog", elf", …

Software Development python
Member Avatar for dseto200
0
88
Member Avatar for dnmoore

have to creat a geosolid class that has 3 sub class i choose sphere cylinder and cone, i got the first two to work but my cone class works except when it calculates the volume it keep getting 0 no matter what number is use for the hieght and radius …

Software Development java
Member Avatar for quuba
0
186
Member Avatar for 000stephen

Thanks in advance for reading this, and commenting. The example below is from p.144 in the latest Lama book edition (O'Reilly 2008), and I can't get it to behave as the book states. It states that the diamond (<>) operator will take user input (which should be a file name), …

Software Development perl ubuntu
Member Avatar for 000stephen
0
140
Member Avatar for mrnutty

hello, I just wanted your input on this program(can it be more efficent?...and so on ). It's a simple program. It reads 5 integers and checks if its an palindrom or not. As you can see I am a beginner. here is my code: [code] #include<iostream> //#include<string> //#include<ctime> //#include<cstdlib> //#include< …

Software Development c++
Member Avatar for grumpier
0
99
Member Avatar for Lukezzz

With this code I am setting a backgroundimage to a button. [code] mybutton1->BackgroundImage = Image::FromFile("D:\\pic1.JPG"); [/code] What I need to do is to also be able to remove this image from the button as it was before I did put the image to the button so the button doesn´t have …

Software Development c++
Member Avatar for Lukezzz
0
97
Member Avatar for lara_

I've just wrote this program and when i compile, the gets() function is skip before i can enter the string. i have try cin.getline but the same problem occurs. Can anybody tells me what's the problem and to solve it? [code] #include<iostream> #include<cctype> using namespace std; int main () { …

Software Development c++ puzzle
Member Avatar for Narue
0
2K
Member Avatar for serkan sendur

when someone include <iostream> how does the compiler know which library to load?

Software Development c++
Member Avatar for Narue
0
109
Member Avatar for tgreiner

I am trying to write a function that reads numbers out of a string of comma separated values. The first function is: [code=cplusplus] unsigned get_frame(unsigned &index, char input[]) { const comma=','; char *letter; char *accum=""; unsigned out; while (input[index]!=comma) { *letter=input[index]; strcat(accum,letter); index++; }; out=atoi(accum); index++; return(out); }; [/code] This …

Software Development c++
Member Avatar for Narue
0
144
Member Avatar for aparnesh

I need to automatically and dynamically generate an organization tree. The Data comes from an Oracle Database, where the hierarchy is well defined. But I can't seem to find any good way of generating the Tree Structure. Using a tree-view won't work as there are some designations having 2 or …

Software Development data-structure oracle visual-basic
Member Avatar for aparnesh
0
520
Member Avatar for andrepezzo

Hi..my aim is to serialize/deserialize my "SoapPair" class , that contains Axis MessageContext obj (SoapPair receives this from its constructor), not serializable object(when trying to normally serialize , it returns "axis MessageContext not serializable").. How do I serialize/deser the SoapPair class? Do I have to use SerializationContext/Deser context? How? Thanks …

Software Development java
Member Avatar for ~s.o.s~
0
167
Member Avatar for karang

Hi How to convert CString to char* in C++ Regards Karan

Software Development c++
Member Avatar for cikara21
0
2K
Member Avatar for Werdan

I want to ask user to input two parameters of one product and I want both of them to go on the same line. However, I also want to have some text between the values that user inputs. So, I want to have something like this: 1) Initial text: "Oil …

Software Development c++
Member Avatar for MosaicFuneral
0
624
Member Avatar for Agni

This code here is giving segmentation fault. Any clues why? also any general tips for writing good multi-threaded code are welcome. [code=c++] #include <windows.h> #include <process.h> #include <iostream> using namespace std; unsigned __stdcall Display(void* p) { Sleep(500); cout << "Display" << endl; cout << *((int*)p) << endl; return 0; } …

Software Development c++
Member Avatar for Salem
0
192
Member Avatar for new2c++

hello, i have just started trying to learn c++ and have been told to create a game of connect four player vs comp. i have managed very little and am stuck on trying to get the computer to recognise that when the cell is occupied rather than not put the …

Software Development c++
Member Avatar for MosaicFuneral
0
104
Member Avatar for monkey_king

Hi, I was thinking about implementing piping and redirection in some of my programs. But I'm having difficilties getting started. Does anyone know were to read up on this area, or just what to google. Google only gives my tutorials on basic unix commandline usage. thanks in advance

Software Development c unix
Member Avatar for monkey_king
0
83
Member Avatar for suley04

i just want to know, if you are using an argv statement in your code, and you are defining two files (one for input one for output), called inFile and outFile, and you open the first in "r" mode and the second in "w" mode...... can you apply it to …

Software Development c
Member Avatar for suley04
0
109
Member Avatar for lepetitevoddy

I have this wierd kink in this program, it keeps telling me that there is a "missing return statement for public static question. i'm kind of new to JAVA and i've tried everything! please can someone help! import javax.swing.JOptionPane; public class arithmetic { public static void main(String[] args) { JOptionPane.showMessageDialog(null, …

Software Development java java-swing
Member Avatar for ~s.o.s~
0
268
Member Avatar for pete08

Does anyone have an idea how to drag the image in order to see the whole of it? (up-down-left-right) The application is for WM 5

Software Development image
Member Avatar for hieuuk
0
320
Member Avatar for serkan sendur

how it is logical to get this to work? [CODE]#include <iostream> using namespace std; int main() { int a; if(a = 0) { cout<< "oldu" << endl; } else { cout << "olmadi" << endl; } return 0; }[/CODE] whereas in c# you can not do something like below : …

Software Development c++
Member Avatar for Narue
0
117
Member Avatar for stindeee

Hello! I muss create a diamond shape, with 4 (triangles). The first 2 i was able to make it, but 2 others not. So i need some beginners help. [code] //* //** //*** //**** //***** for (int i=0;i<value-1;i++) { for (int j=0;j<=i;j++) { cout<<"*"; } cout<<endl; } for(int a=0; a<value; …

Software Development c++
Member Avatar for Lerner
0
91
Member Avatar for suley04

Yesterday I created a thread called "File Handling Problems!!"..... today within the first half an hour I have moved forward a bit (which is a relief)..... but I still have a problem..... [CODE] 1.#include <stdio.h> 2.#include <string.h> 3. 4.int main() 5.{ 6. int week = 0; 7. int units = …

Software Development c
Member Avatar for suley04
0
102
Member Avatar for babi

I need to use an array of chars to input chars from the console but I don't know how many chars will be actually inputed. How can I have an array of chars whithout knowing its size in advance? I could put the array with a very high size but …

Software Development c c# c++
Member Avatar for Freaky_Chris
0
589
Member Avatar for leb

Do any of you know a function to play a playlist in PyGame? The music files on the playlist should be played one after the other in the order they occur. Any type of help would be appreciate it.

Software Development python
Member Avatar for hupa_nguyendinh
0
190
Member Avatar for tomtetlaw

Hi all, I am making a text game in c++ and i am trying to get the player's attack to ba a random number between 1 and 7, but when i try to compile it, it gives me this error: 49 C:\Documents and Settings\Games\Desktop\C++ Tutorial\Combat\main.cpp void value not ignored as …

Software Development algorithm c c# c++
Member Avatar for Narue
0
321
Member Avatar for Crazywu

I have completed a script which opens various txt files within a folder path and does calculations on them, currently being set for example: path = "./folderfileshere" is there a simple solution to grab a folder path using a gui function similar to that of the browse for folder function …

Software Development gui python
Member Avatar for Stefano Mtangoo
0
774
Member Avatar for darkyere

here i go whit a new problem and yet the same... i think. on one of the forums i posted my last question in (im lost) the answer was that i could set i to be 0 from start in form load procedure. i did and it worked for a …

Software Development pascal
Member Avatar for jsosnowski
0
210
Member Avatar for roadToNowhere

right, so ive got this problem, basically, ive got a bunch of text files and i want to use the scanner to go through every single file, and seperate every single word from all the text files, i tried everythnig, and ive scoured this forum my code looks like this: …

Software Development java
Member Avatar for roadToNowhere
0
110
Member Avatar for javafrustrated

I have a program that allows a user to input an integer value into an applet (the number entered determines the size of a list). From the value entered the program determines how many comparisons are required to sort the list using the size inputted. The applet is working but …

Software Development java user-interface
Member Avatar for javafrustrated
0
352
Member Avatar for Bhoot

i am developing a project in vb 6 which deals with printing lots of forms and invoices - all containing user-filled details. The invoices have different structures - some are tabular (with irregularly placed columns, however) while some are plain text (letter-like). i am going to use MS Access for …

Software Development printer visual-basic
Member Avatar for Bhoot
0
148
Member Avatar for firoz.raj

Sir when i click on grid i got error memeber or data memebr not found and cursor goes on grd_leavecell() event Kindly help me i also send production_tabletest.mdb . Private Sub Grd_LeaveCell() Dim strOldValue As String On Error GoTo Grd_LeaveCell_Error If Grd.Col < GRID_COL_OFFSET Then GoTo Grd_LeaveCell_Done If FlexGridEditor.Visible Then …

Software Development visual-basic
0
219
Member Avatar for Rejinacm

I want to create varibales as a1,a2,a3,...a10. For that i used a for loop.As the variable in loop increments..i need var gettng created as above . Can anyone give me an idea? At the same time of creation i need to be able to assign to them There i m …

Software Development python
Member Avatar for paddy3118
0
116
Member Avatar for realahmed8

I need little help in adding Sin & Cos functions to my calculater , and also in Layout (need textfield to be on the top), so please help me if you can.. that's my code: package javaapplication3; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.*; //import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import …

Software Development algorithm data-structure java java-swing
Member Avatar for javaAddict
0
278
Member Avatar for karang

Hi I have a value of emdash &#8212; First of all I want to know Is this &#8212; a unicode If Yes How to convert unicode i.e. &#8212; into -- using code in VC++ Regards Karan

Software Development c++
Member Avatar for ArkM
0
378
Member Avatar for Ragupathiyuva

Hi Can anybody tell me What is the usage of Static functions and where we can use what is the advantage of Static functions over Normal functions Advance Thanks for helping

Software Development c
Member Avatar for Ragupathiyuva
0
102
Member Avatar for shouvik.d

Hi, I am using a scheduled task that runs every night to take backup of important files. This task creates a folder in the following format Backup_DD_MM_YY where DD_MM_YY denotes the date when the backup was taken. Now everytime this scheduler runs I need to remove the older directory and …

Software Development shell-scripting
Member Avatar for eggi
0
345
Member Avatar for murderotica

Hello there, I've been busy nowadays with file manipulation and I've so far I've encountered a small problem in appending the contents of a file to another file. This is what I did: [CODE] string filename = @"C:\Temp.txt"; string body = null; StreamReader sr = File.OpenText(files); body = sr.ReadToEnd(); StreamWriter …

Software Development file-system
Member Avatar for murderotica
0
283
Member Avatar for Lukezzz

In Visual C++ Express Edition you can insert button controls on a form. These buttons has a rectangular form. You can even do them like a square. Is it possible to do Round Buttons in C++, like this letter: [COLOR="Red"]O ? [/COLOR] (It is important that the area where you …

Software Development c++
Member Avatar for Liszt
0
3K
Member Avatar for jrobw

hi, i alreday posted under [URL="http://forums.sun.com/thread.jspa?threadID=5355743&tstart=30"]http://forums.sun.com/thread.jspa?threadID=5355743&tstart=30[/URL] yesterday, but no one helped me. it's an assignment for university, i have only few hours left to complete it, any hints would really be great!! here my post: I have to write a frame with two componenents of squared size (i chose 450 …

Software Development java
Member Avatar for neilcoffey
0
193
Member Avatar for Typewriter

Hi, I'm pretty new to using C# and have come across a problem that I thought would be pretty simple, and it probably is but I'm stuck. I'm trying to get a user to select a file using a file dialog box and once that has been selected to get …

Software Development file-system
Member Avatar for hieuuk
0
205

The End.