49,761 Topics

Member Avatar for
Member Avatar for NinjaLink

This is my goal: - Search the list for a number and display how many times the number occur or display 'number not present' - Modify number and change each occurrence of a #, to the new number or display 'number not present' I have 2 functions. My first function …

Member Avatar for NinjaLink
0
201
Member Avatar for uw1

the following example shows the problem: "int* pointername = new int" followed by "delete pointername" - no problem. however: "int* pointername = new int[8]" followed by "delete pointername" flags`an error during execution. (compile/built are passing ok). This happens with 2 very different compilers: vc++ (native) and djgpp one. looks like …

Member Avatar for uw1
0
99
Member Avatar for Lukezzz

I get a problem when adding columns to a dataGrid. I keep adding columns with the code below. It works well until the column will come outside the right side of the dataGrids Widh. When it does, the program will get stuck for 2 minutes or so and the column …

Member Avatar for Lukezzz
0
79
Member Avatar for Raulin

Hi there.. I am currently making a snake game, by means of array set up of [50,50] of the snake, and the FLTK for the design of it's interface. As Quincy 2005 is the default IDE learnt in Univ, I do the c++ codings here. I already proceeded with the …

0
55
Member Avatar for ariesangel

for(i=0;i<9;i++) { x[i] = rand()%9+1; for(j=1;j<9;j++) { if(x[i]==x[i-j]); i--; } } pls tell me how the rand() function work. urgent. as soon as possible.

Member Avatar for ariesangel
0
157
Member Avatar for DanDaMan

Can someone please help me out? What are the pros and cons of C++ and Java? I've always been told that C++ is the ultimate programming language. It's powerful, fast, and used to run huge programs. But since Java is a close rival to C++, I was wondering what are …

Member Avatar for Rashakil Fol
0
132
Member Avatar for d1s_0n3_guy

Write a program that will prompt the user to type in a series of characters. Input these characters into a c-string (char array). For each character, if it is a letter, toggle the case (upper to lower case, or lower to upper case). All other characters leave as is. Print …

Member Avatar for d1s_0n3_guy
0
211
Member Avatar for mybluehair

I am creating a code, and I'm getting this weird error. I'm sure its a stupid mistake, but I can find it. [quote] multiple definition of `Start()' first defined here ld returned 1 exit status C:\Documents and Settings\Andrew\My Documents\projects\equation\Makefile.win [Build Error] [equation.exe] Error 1 [/quote] And here is the code: …

Member Avatar for WaltP
0
89
Member Avatar for matt91turbo

I need a little help to get me going on how to start this program. I know how to create a string array, but I'm having trouble getting the overall structure for this program. Any help or links to helpful sites would be appreciated. Write a program that will read …

Member Avatar for vmanes
0
206
Member Avatar for mybluehair

I have a c++ console program that alot of people are starting to download. But the program is updated around once a week. problem is, most of the downloaders never check for updates on the site. could add a feature to my program were it would do a check for …

Member Avatar for MosaicFuneral
0
101
Member Avatar for jlatorre80

Can someone please help me with figuring out why my codes does not run. I have tried to familiarize myself with how to get data from a file and discovered i need to use fstream. The data of the file is somethin like this: 19531029L 20081104L 19770615L 19300723L 19631122L 19410501L …

Member Avatar for MosaicFuneral
0
115
Member Avatar for Trekker182

I was wondering if anyone could offer some suggestions on how to validate a social security number & their employee # that a user would input separately through prompts? The SS# would be in the form of xxx-xx-xxxx where the x's are 0-9. I tried using this function that I …

Member Avatar for Trekker182
0
831
Member Avatar for Raulin

Hi there, I am currently doing the snake game for my c++ project. For your information, I am not majoring in computing or any programming course, but am majoring in Physics at Univ of Birmingham, UK. About my task, I employ the use of vectors as the main function to …

Member Avatar for Raulin
0
106
Member Avatar for Tchevalier

Im new to c++ and i'm tryin to compute the standard deviation of a set of floating point numbers using a data file. here I started my program and skip over things i didn't really know but can someone plaese help me. **************************************************************************** #include<iostream> #incluse<fstream> #include <cstdlib> #include <cmath> int …

Member Avatar for VernonDozier
0
201
Member Avatar for skatamatic

For a lab, my instructor asked us to include an assignment operator with our class, but to hide it. Does this mean to declare it as private and just leave an empty implementation? Is this common/useful?

Member Avatar for wt1099
0
309
Member Avatar for zothos

I have a problem with a code attempting to do a factorial of a number. For numbers 12 and below, the code works fine, but when I do 13 and above it outputs the wrong number. [icode] #include <iostream> using namespace std; int number; int number2; int main() { cout …

Member Avatar for MosaicFuneral
0
269
Member Avatar for afg_91320

i have this given structure: [code] struct Tempscale { double farenheit; double centigrade; }; struct Reading { int windSpeed; double humidity; Tempscale temperature; }; [/code] i am then asked: define a Reading structure variable is this ok: Reading data; write statements that will display following data: wind speed : 37mph …

Member Avatar for Ancient Dragon
0
394
Member Avatar for Evil Genius

Hi, I was coding the following program.. [ICODE] // Program takes work hours and rate per hour and gives total // salary after tax, if work hours are over 40, its increased by 1.5x. #include <iostream> #include <conio.h> using namespace std; int main() { double hr_work, hr_rate, taxed_total, total; cout …

Member Avatar for Evil Genius
0
132
Member Avatar for n3XusSLO

[CODE]std::string s="s1"; std::cout<<s<<std::endl; { std::string s="s2"; std::cout<<s<<std::endl; };[/CODE] Why can I have two variables with the same name existing like this?

Member Avatar for Lerner
0
191
Member Avatar for jlatorre80

Ok, well I am new to c++ and have been trying to get the basics down. I have a class assingment which require me to read numbers from a file and store them into a vector as long int. An example of the file would be : 19531029L 20081104L 19770615L …

Member Avatar for MosaicFuneral
0
131
Member Avatar for britishemo15

Hi everyone, basically i'm writing a simple program in c++ to trigger a beep from the internal speaker much like a musical keyboard except i'm having trouble with capturing key press how would i be able to trap a key press then initiate a beep, i have tried using kbhit() …

Member Avatar for MosaicFuneral
0
1K
Member Avatar for localp

i want to create a hash table ( independent rehashing ), using STL LIST... in Independent rehashing we use a function to we need to generate the index then check if there is any collisions if there is we need to rehash it and then put it in to the …

Member Avatar for Lerner
0
185
Member Avatar for laki234

hi. i have to do addition,multiplication,division and substraction of large numbers using c++. Using pointers and struct .I m sending some code.plz if anyone can do this program help me. here r some code plz send me on [email]fri_003@yahoo.co.in[/email] as soon as possible. [code=cplusplus] #include<stdio.h> struct node { long int …

Member Avatar for vmanes
0
98
Member Avatar for guest7

Hi, I am using the STL container for stack. <include> stack; I wish to check whether the integer is already in the stack or not before adding it into the stack. If it is in the stack then i do not need to add it. But if it is not …

Member Avatar for Lerner
0
69
Member Avatar for rhoit

I am new to the templates.. I was trying to implement templates in my x programs.... and i am stuck ... help me... problem is with the "search" function when i was not using templates search function was [B] Stack::Nodeptr Stack::search(char item)[/B] and worked perfectly fine.. when using templates... i …

Member Avatar for Lerner
0
170
Member Avatar for Vux

Is there a way for example, to use WGET, inside of a C program? I want to download the text of a website's index.html (ie [url]www.google.com/index.html[/url]) and then send it over to another program via sockets. Is this possible?

Member Avatar for vijayan121
0
778
Member Avatar for Lukezzz

I wonder for if I have a made a formapplication in VC++ 2008 Express Edtion that consists of 10 forms and I am for the moment writing code in Form10 and then want to compile and test the function. What I wonder is if I only can compile Form10 and …

Member Avatar for Lukezzz
0
86
Member Avatar for AcidG3rm5

[code] class Date { public : Date(); void getDate(int,string,int); private : int day; string mth; int year; };//end class //getdate void Date::getDate(int& inDay,string& inMth,int& inYear) const //error here { inDay=day; inMth = mth; inYear=year; } [/code] I'm doing up a date class. Am doing a class function getDate to return …

Member Avatar for Nick Evan
0
208
Member Avatar for clutchkiller

Hi guys, right now I am an amateur in the world of programming and am starting to "train" myself by thinking of ideas for a program and figuring out how to write it. So right now, my first real undertaking I have devised is to write an itemizer where the …

Member Avatar for Nick Evan
0
108
Member Avatar for Agni

Hi guys.. I'm facing a problem in my project. Basically its a small project for a retail store inbound section. The goods come in cartons and the user enters the carton ID in the UI to accept the carton. In the backend the carton details get updated in the table …

Member Avatar for Agni
0
87

The End.