132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Excizted

Hi :) I am certain of when to use static_cast, but often I can get satisfactory results by writing the target type in a parenthesis. For example: [CODE]void* data = somePointer; SomeClass* new_ptr = static_cast<SomeClass*>(data);[/CODE] seems to work when replaced with [CODE]void* data = somePointer; SomeClass* new_ptr = (SomeClass*) data;[/CODE] …

Software Development c++
Member Avatar for Excizted
0
142
Member Avatar for JaksLax

Here is my code: [CODE] /** * @file qsort.cpp * * @date 11/2/07 * * This program implements the non recursive version of quicksort */ #include<iostream> using namespace std; /** * Swaps two items * * @pre x and y are the items being swapped * @post Contents of actual …

Software Development algorithm c++
Member Avatar for Nick Evan
0
87
Member Avatar for tgraves

I have changed the Path Environment Variable for Windows Command Prompt to: C:\j2sdk1.4.2_04\bin so why, when I try to run javac while in the code folder directory, do I still get the error message "javac is not recognized as an internal..." I was forced to put the path info in …

Software Development java
Member Avatar for peter_budo
0
329
Member Avatar for alenD

Hi all, I want to know how much memory does my umap allocates in ram. I have the following definitions std::tr1::unordered_map<string, long> umap; umap h1; i do some insertions and at the end i want to know how much memory my umap allocates in ram. How can i find this? …

Software Development c++
Member Avatar for alenD
0
116
Member Avatar for superdhebz

How do I get rid of the zero digit in this program? this is a factorial problem and I have to show the numbers to be multiplied before arriving to the answer. The problem is, in the iteration process, the number zero will show. How do I get rid of …

Software Development c++
Member Avatar for superdhebz
0
757
Member Avatar for betabasic

How to Save Web Pages in WebBrowser1 using VB6? It's not about saving the source code to text file.. It's the same as clicking [B]File > Save Page As...[/B] in Firefox. :)

Software Development visual-basic
Member Avatar for vb5prgrmr
0
289
Member Avatar for cool1_best1

We are using a singly linked list with head pointer to implement Stack ADT. The stack top is maintained at the [B]end of the linked list,[/B] i.e. stack top is the last item. Discuss whether this is a good design in term of time efficiency: In a stack of N-items, …

Software Development c++ linked-list
Member Avatar for mitrmkar
0
155
Member Avatar for clutchkiller

MessageBox(NULL, (LPCTSTR)"Test1", (LPCTSTR)"Test1", MB_OK); This code is popping up the window correctly, but it displays all squares. Whats wrong =(

Software Development c++
Member Avatar for Salem
0
111
Member Avatar for AirGear

i'm new in using VB, so i'm not quite familiar with it.. if any of you use cpp, i'm sure that you know STL in cpp, like vector and stack.. does VB has that kind of STL too? i really need good data structure using VB now, and it will …

Software Development data-structure vb.net
Member Avatar for AirGear
0
193
Member Avatar for newcuser

I am getting some build code errors I do not understand how to fix. This is probably because I am so new to programming. Help is appreciated! Line 54 error is missing semicolon before type and lines 56,59, and 60 say i is undeclared??? [code] include<stdio.h> #include<string.h> //Global Variables char …

Software Development c c# c++
Member Avatar for mitrmkar
0
406
Member Avatar for erichan

Hi, I tried everything to fix this but this message still shows if I try to check for errors on my drive C: using PowerQuest Partition Magic 8.0.I thought running microsoft chkdsk can solve this problem but not workable. What can I do? Is it possible that this is a …

Software Development microsoft operating-system
Member Avatar for uveam
0
160
Member Avatar for makan007

[CODE] #ifndef Test_h #define Test_h #endif [/CODE] May I know what are the above 3 syntax for? How can I use it? Is is used only in header file?

Software Development c c# c++
Member Avatar for jonsca
0
144
Member Avatar for techie929

//Here is the function of inserting nodes.I tried using strcmp but its still not working. [CODE] void BinarySearchTree::insert(char* d) { tree_node* t = new tree_node; tree_node* parent; strcpy(t->data,d); t->left = NULL; t->right = NULL; parent = NULL; // is this a new tree? if(isEmpty()) root = t; else { //Note: …

Software Development c++
Member Avatar for mitrmkar
0
108
Member Avatar for tquiva

Can someone please help me? I am creating a program to calculate the cost of excess minutes with two cell phone companies. I am reading my data in from a file. This is the data from my file. [CODE] 2 32 3 45 1 36 3 15 1 30 1 …

Software Development c
Member Avatar for jonsca
0
124
Member Avatar for paddy8788

Hi! I am trying to figure a way to measure a process' system time. The Unix's time command seems in effective because it only displays the result in seconds but my program is small so second is inappropriate. I also tried to use gprof. However gprof uses atexit() to trace …

Software Development c unix
Member Avatar for paddy8788
0
150
Member Avatar for BigGar

Hello. I've programmed in VB for ages, but just started dealing with databases and VB.net. The problem I am having is related to a menustrip item. I used the data source wizard to add a database to my application, and did the drag-and-drop thing to put the details on my …

Software Development vb.net
Member Avatar for kvprajapati
0
135
Member Avatar for sandyben

i have a main java code called home.java which is an interface. when i press button BTNSTART , i want d progm WebCam.java to exxecute. but it's giving me an error saying : [B]ERROR[/B]: home.java:146: cannot find symbol symbol (constructor WebCam()) the code home.java : [CODE] import javax.swing.*; import java.awt.*; …

Member Avatar for sandyben
0
592
Member Avatar for dls_20022002

i'm new to c++. i started with the following code and i have an, ISO C++ forbids comparison between pointer and integer ERROR. My my program is for a library. i am now trying to have it pull up my file and read then edit a bookfile. the area in …

Software Development audio c++
Member Avatar for jonsca
0
627
Member Avatar for Jalwes

I am writing a program for class that I keep getting a segmentation fault on. I am fairly certain that it has to do with the assignment of the 'string location.' Could anyone possibly give me a hint as to what I'm doing wrong? I'm very new to this, I've …

Software Development c++
Member Avatar for jonsca
0
132
Member Avatar for mmgoicochea

I have this code and Im getting two errors when debugging... Im trying to change it to arrange it but I think I have a major error.My "experience" in c++ is veeery basic this is my third week in college :( I need help please the errors are: >assignment5.obj : …

Software Development c++
Member Avatar for mmgoicochea
0
113
Member Avatar for wale89

[QUOTE]This program actually have 4 function. 1)AddLast = to add a new node at the last of the list 2)FindNode = to find the desired node 3)DeleteNode = to delete the desired node 4)DisplayNode = display the list Now..my problems is with the AddLast function.. Before this I done with …

Software Development c++
Member Avatar for wale89
0
190
Member Avatar for clutchkiller

Do any of you guys know if Winsock is a popular API that is used for companies hiring programmers? Thanks

Software Development api c++
Member Avatar for clutchkiller
0
80
Member Avatar for faaz

I have this homework assignment that i need help with and below is the code that i have so far. any help would be appreciated. thank you. Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, …

Software Development c++
Member Avatar for restrictment
0
1K
Member Avatar for james_bond007

Hi. Let me start off by saying I've done no programming in my life aside from the 2 weeks of Intro to C++ class I've had so far, so I've got little idea of what I'm doing. Our assignment is to write a program for the 'game of NIM', essentially. …

Software Development c++
Member Avatar for WaltP
0
2K
Member Avatar for ace8957

Hi everyone I am trying to write a program that will allow to people to play tic tac toe. My constraints are that this must be accomplished mainly through the use of functions and that the default cell field for the displayed game board must be stars. I am having …

Software Development c++
Member Avatar for ace8957
0
3K
Member Avatar for babyd_

I am new at programming and got an assignment that is due tomorrow. I have to develop a program that calculates pay and bonus for three sets of workers. HELP!!!

Software Development c++
Member Avatar for jonsca
0
98
Member Avatar for mswezey

Hello. Just need some advice on what I'm doing wrong with my code down below. I'm suppose to right up a program that reads in maze code that looks like this " 2 3swensw 2 1" for example. the first two digits = row & columns of the array while …

Software Development c++
Member Avatar for WaltP
0
158
Member Avatar for dude1

i need to make a program that reads in a file and list things like the number of characters,words lines spaces tabs etc. anyone know the best way to do this? any help anyone can provide is appreciated thanks

Software Development c++ file-system
Member Avatar for WaltP
0
100
Member Avatar for kavithabhaskar

Hi I am trying to count the number of words in a file and this is what i have so far. I am not sure about the getchar().. could you please tell me what i should be doing ? [code] #include<iostream> #include<fstream> #include<string> #include<conio.h> using namespace std; int main() { …

Software Development c++
Member Avatar for necrolin
0
267
Member Avatar for caribedude

Hi, I seem to be getting myself into a lot of segmentation fault errors lately. The that currently has me stuck is one that shows up after I exit my program (an SDL App). When I need to debug I usually use the debugger or a Logger class I found …

Software Development c++
Member Avatar for caribedude
0
253
Member Avatar for faaz

I have this homework assignment that i need help with and below is the code that i have so far. any help would be appreciated. thank you. Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, …

Software Development c c# c++
Member Avatar for restrictment
0
773
Member Avatar for karolik

So I'm trying to find a way to basically generate 100 numbers from 0 to 99 in random order with no duplicates. This is my code, and as you can see it displays 100 numbers but....some are duplicates. [CODE] srand((unsigned)time(0)); for (int count = 0; count < 100; count++) { …

Software Development c++
Member Avatar for jonsca
0
118
Member Avatar for PDB1982

I am trying to start the odometer reading at 0 to start with, but I want it to increase everytime the user inputs MilesDriven. I can't seem to get it to work...any ideas? [code] //Paul Baker //TRCC Intermediate C++ //Assignment 3, Odometer #include <iostream> using namespace std; class Odometer { …

Software Development c++
Member Avatar for PDB1982
0
95
Member Avatar for clutchkiller

[code] #include <iostream> using namespace std; class A { private: int a; }; A::A() { a = 10; } int main() { A obj1; cin.ignore(); cin.get(); } [/code] It is giving me the error Error 1 error C2600: 'A::A' : cannot define a compiler-generated special member function (must be declared …

Software Development c++
Member Avatar for mrnutty
0
142
Member Avatar for suncica2222

[CODE] _CreateProcess __CreateProcess = NULL; __CreateProcess = (_CreateProcess)GetProcAddress(GetModuleHandle("Kernel32.dll"), "CreateProcessA"); [/CODE] what is this (_CreateProcess) in the code??? is this a cast types? __CreateProcess = [B][COLOR="Red"](_CreateProcess)[/COLOR][/B]GetProcAddress(GetModuleHandle("Kernel32.dll"), "CreateProcessA");

Software Development c++
Member Avatar for WaltP
0
91
Member Avatar for bharatk

I have function in my program calls a class which opens a new window [CODE]class TopLevel3: def __init__(self): self.root2 = Toplevel() self.canvas3 = Canvas(self.root2, width=400, height=200) self.canvas3.pack() self.root2.title("ImageDB") r = 0 for c in range(6): Label(relief=RIDGE, width=55).grid(row=r, column=0) Entry(relief=SUNKEN, width=20).grid(row=r, column=1) Button(text='View Image').grid(row=r, column=2) Button(text='Update Tag').grid(row=r, column=3) r = r+1 …

Software Development python
Member Avatar for bharatk
0
118
Member Avatar for Morrac

I am creating a C program to work with environment variables and I am having some problems. I have three choices to input from the command line: a.exe, a.exe <environment_variable_name>, or a.exe -a. The 'a.exe -a' should display a list containing all environment variable names and assigned values, with one …

Software Development c c# c++
Member Avatar for Morrac
0
113
Member Avatar for Vandithar

Hi, I have installed WWW-Mechanize-1.60 in Linux platform. Problem is that i am getting this error. [code] Error GETing http://www.example.com:Can't connect to eutils.ncbi.nlm.nih.gov:80 (connect: timeout) [/code] Here is my code. [code] use WWW::Mechanize; $url="http://www.example.com"; $mechanize = WWW::Mechanize->new(autocheck => 1); $mechanize->get($url); $page = $mechanize->content; [/code] How can i solve this error? …

Software Development perl
Member Avatar for d5e5
0
252
Member Avatar for Martje

Hi all, I am trying to write a string to a multiline textbox but apearently my code doesnt do as i want... This is the code i am using : [CODE]textBox9>Lines[0]="Succes";[/CODE] But when the code executes nothing happens in the textbox, everything just stays thesame :S Am i doing something …

Software Development c++
Member Avatar for Martje
0
433
Member Avatar for kylethedarkn

I'm Taking a Class on Java at my Highschool, but my teacher goes very slow and I need a quicker pace. Could anybody so kind as to give me a list of simple classes and commands so that I could work with them. Also does anybody know a Good program …

Software Development java
Member Avatar for wee_shark
0
197
Member Avatar for Purnima12

I wish to create a program that informs the user whether a given date is a holiday or not - Here is how it should work: The student should be prompted to enter an integer for the month and then prompted to enter an integer for the day. (For example, …

Software Development python
Member Avatar for woooee
0
163
Member Avatar for Dyed Purple

Hiya. I'm a complete C++ noob. I'm trying to make a bingo game where the computer gives the user eight numbers and the user slowly plays a game of bingo. It's very much work in progress. However, I'm having a problem when trying to compile it, the program seems to …

Software Development c++
Member Avatar for Dyed Purple
0
131
Member Avatar for thakur.ravi26
Member Avatar for jemz

hi please help me on this... Can someone help me, what is the essence or the use of this...hoping for your positive responds... adOpenDynamic adOpenForwardOnly adOpenKeyset adOpenStatic adLockBatchOptimistic adLockOptimistic adLockPessimistic adLockReadOnly

Software Development visual-basic
Member Avatar for WaltP
0
105
Member Avatar for i_luv_c++

hey guys im working on a homework problem..im done with 99% of the problem :|however i cnt figure out how to display my output(which is in dollars) using the comma my output shows >>160000 how would i make it >>160,000 um should i use setprecision??? please help thanks:)

Software Development c++
Member Avatar for i_luv_c++
0
163
Member Avatar for jemz

hello can you help me how to use the code tags so that i can post all my code and not to be banned.. [CODE][/CODE] where i put my code inside this bracket or in the middle of this two bracket? i have 3 points more to go..hoping for your …

Software Development visual-basic
Member Avatar for WaltP
0
139
Member Avatar for automata

First I am sorry if I am creating a thread in the wrong category as I am not sure which is the best suitable place for this question: Please provide me suggestions or any pointers. I want to create a user defined data structure, which will be a 2 dimensional …

Software Development data-structure vb.net
Member Avatar for automata
0
611
Member Avatar for newcuser

I am trying to input a text file with twenty unsorted names in it into an array and then perform a bubblesort and output to a new file. The filename for the txt file is names.txt Here is what I have so far....not much...I would appreciate some help the right …

Software Development c file-system
Member Avatar for newcuser
0
2K
Member Avatar for zac_mathews

Hi I am a J2ME developer I am new to Dani Web. I am using chartapi.finance.yahoo.com to calculate and display chart. My questions is how to convert TIMESTAMP value to a Java Date or Calendar Object ?..... For Eg: URL GIVEN BELOW [URL="http://chartapi.finance.yahoo.com/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv/"]http://chartapi.finance.yahoo.com/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv/[/URL] Its output will be uri:/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv/ ticker:aapl unit:MIN …

Software Development finance java
Member Avatar for zac_mathews
0
1K
Member Avatar for miles.85

I will start a new project. But I have some simple questions about it : 1) Is the C faster than Java on processes which has no graphic user interfaces (like softwares which are working just from command line) ? 2)Because if the C is faster than Java, I want …

Software Development c c# c++ gui java
Member Avatar for miles.85
0
220

The End.