49,757 Topics

Member Avatar for
Member Avatar for Aarowaim

I'm working on a simple program in which the user types a sentence, the program iterates through the string that the sentence in stored in and alternates each letter's case, and then puts the formatted text into the clipboard. I know exactly how to allow input and change case/check if …

Member Avatar for Aarowaim
0
266
Member Avatar for stevanity

Hello guyz! Im conducting a debugging contest... Im writing some questions... I wrote a code implementing virtual functions.. Im not sure where to include bugs here.. Can anyone help me add bugs to this code?? Please bugs must make people think.. THey must not just be syntactical errors.. Thank you.. …

Member Avatar for Zcool31
0
107
Member Avatar for darshilpatel34

[TEX]Hi I'm into a code in which I have to Design a class named Account that contain: 1. Int data field named "id" for the account. 2. Double data field named "balance" for the account. 3. Double data field named annualInterestRate that stores the current interest rate. 4. A no-arg …

Member Avatar for VernonDozier
0
180
Member Avatar for devindamenuka

hi all, here with I attach a programe written from using C++ language. I am new to C++. problem is I want to be a good programmer and I think I still do mistakes in witting programes. what I want is check my code and criticize my mistakes. tell me …

Member Avatar for Zcool31
0
870
Member Avatar for CY0T3R

/*PROGRAM TO PRINT SUM OF THE FOLLOWING SERIES - X + X*X/2! + X*X*X/3! + X*X*X*X/4!....n terms. I'm not getting the correct output. eg-for n=3 and x=2; compiler's ans = 4.66 correct ans = 5.3. HELP ME OUT...*/ [CODE]#include<iostream.h> #include<math.h> #include<conio.h> void main () { clrscr(); float x,sum=0; int n,fact=1,j,k; …

Member Avatar for CY0T3R
0
217
Member Avatar for randrum1707

Hello everyone, I'm having a problem with an assignment that I'm not sure how to fix I'm getting the following error: accountdb.cpp:55: error: cannot convert std::string to const char* for argument 1 to int strcmp(const char*, const char*) Here is my header file: [CODE] #ifndef ACCOUNTDB_H #define ACCOUNTDB_H #include "account.h" …

Member Avatar for randrum1707
0
1K
Member Avatar for ecin

I'm using visual c++ 2008. I don't know what namespace system and system::Glob.. are. I've never used "wchar_t" nor Console::Write. Is there a way to display unicode characters with the C++ that was taught to me in school? It looks that ASCII II is supported by using the char datatype …

Member Avatar for jackwu
0
4K
Member Avatar for strizh

Can somebody help me figure out what I did wrong with my default constructor declaration I'm getting an error message no appropriate constructor available Thanks [CODE] TimeOff.h class TimeOff { private: string name; int id; NumDays maxSickDays; NumDays sickTaken; NumDays maxVacation; NumDays vacTaken; NumDays maxUnpaid; NumDays unpaidTaken; public: //default constructor …

Member Avatar for Topi Ojala
0
218
Member Avatar for C++ programmer

What does this statement mean "[B]These functions (read(), readline(), readAll()) read a line of ASCII characters from the device, [U]up to a maximum of maxSize - 1 bytes, stores the characters in data, and returns the number of bytes read[/U].[/B]" I have used readAll() and readLine() it returns all the …

Member Avatar for thines01
0
143
Member Avatar for shywolf91

Here is a c++ program I have been working on for an intro c++ class: [CODE]//hangman //Dylan Metz #include <iostream> #include <string> #include <fstream> #include <cstring> using namespace std; //functions //double index(); int main() { int const SIZE=22; char name[20]; char dash[SIZE]={" "}; char q; //The User's Guess int NumOfGuess=6; …

Member Avatar for augustus7
0
154
Member Avatar for triumphost

I have: [CODE] class ANew { private: vector<CustomType> ArrayOfTypes; public: ANew() : ArrayOfTypes(0) {} ~ANew() {} ANew& operator ()(int I) { return ArrayOfTypes[I]; } operator const ANew* () const { return ArrayOfTypes; } }; [/CODE] But it gives me these errors: [ICODE]C++\Types.h|12|error: invalid initialization of reference of type 'ANew&' from …

Member Avatar for mike_2000_17
0
139
Member Avatar for myk45

Hello, I'm trying to use the compiler optimizations for GCC 4.3.3. I used the following [URL="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html"]LINK[/URL]as a reference. I'm mainly using the O2 and Os levels of optimizations. Could anyone please let me know if the order in which the options matters? Thanks in advance!

Member Avatar for myk45
0
201
Member Avatar for stereomatching

I am studying the source codes of SGI STL and have many problems with it. I can't figure out the design choice of the iterator of SGI STL as follow [code] template <class _Tp, class _Ref, class _Ptr> struct _Slist_iterator : public _Slist_iterator_base { typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator; #1 …

Member Avatar for stereomatching
0
144
Member Avatar for jonnyboy12

Hello Hello Hello. At the moment i am working on contacting my web server through my browser. I have got it working. I can communicate with my web server by typing [url]http://localhost[/url] into my browser. [CODE] // fakewebserver.cpp : Defines the entry point for the console application. // #include "stdafx.h" …

Member Avatar for DeanMSands3
0
239
Member Avatar for alexbnc

Hello, I am going crazy with this application. I am trying to re-size and re-position all the window's controls as I re-size it and I don't get the expected result. I have my application source code here: [URL="http://www.devimperium.info/ResizeTest.zip"]http://www.devimperium.info/ResizeTest.zip[/URL] I create the project with CodeBlocks Please, give it a try and …

Member Avatar for alexbnc
0
91
Member Avatar for jonnyboy12

Hello all. I have made a web server in c++; I am able to type in my browser [url]http://localhost[/url] , this will contact my server and make a connection i can add a variable onto the end separated with a ?. I want to send messages to my web server …

Member Avatar for JorgeM
0
173
Member Avatar for ccoder83

Hi, I have a grid, which contains cells that have several different properties. [CODE]struct fluidProperties1 { float foo; float bar; };[/CODE] and I create the grid as follows using a template [CODE]Grid2D<fluidProperties1> grid1;[/CODE] Now, I want to pass the array formed only by the values of foo, and not by …

Member Avatar for ccoder83
0
823
Member Avatar for Jay22

ok so basically my code is complete but I keep getting an error on one of my brackets and it says I need to put a ' ; ' behind "int LinearSearchArray ( const int list[], int numEless, int value)" and when I do that it brings up more errors. …

Member Avatar for MandrewP
0
163
Member Avatar for sharath_137

Hi, I tried to debug my code using printf statement... But previously it was working and today when i tried the same it was not working.... I tried the properties option and it is all the same as before..can any one help me....

Member Avatar for sharath_137
0
131
Member Avatar for pushpat

Hi folks, I am learning operator overloading concept in c++, wrote sample program to test overloading of unary operator '!' and '-'. Code will work if i use them as friend function but not for member function. Can anybody tell where am i going wrong in function bool operator!(const co_ordi …

Member Avatar for pushpat
0
334
Member Avatar for arubajam

Write a statement that declares and stores the elements of the following array into a vector object: char vowels[5]={'a', 'e', 'i', 'o', 'u'}; I think this is what I need, but I want to verify this. [CODE]char vowels[5]={'a', 'e', 'i', 'o', 'u'}; vector<vowels> vowelsList (vowelsArray, vowelsArray +5);[/CODE]

Member Avatar for subith86
0
177
Member Avatar for Moirke

[code]#include <iostream> #include <vector> using namespace std; char img[30][15]; char x = 'X'; int dotLoc[24][2]; int dotNum = 0; int ret[4]; int curDie = 0; int dieNum = 0; int der = 0; vector<int>* readDice(vector<string>&); int dieDots(int, int); void findDots(); bool adjX(int,int); bool traverse(int,int,int,int); vector<int>* readDice(vector<string>& anImage) { // TODO: …

Member Avatar for Ancient Dragon
0
276
Member Avatar for yongj

I'm trying to learn hash tables as I am hearing that it'll be utilized a lot in the future (advanced programming). My book, however, does not include any lessons on Hash Tables. Any good references for someone trying to learn Hash Tables? Thank you!!

Member Avatar for yongj
0
171
Member Avatar for mc3330418

I tried to write the function myself for a switch statement that would take a char and multiply it by a certain amount and then return the total. I'm a little confused on how the object gets passed to the case function. But here's what I got. [CODE] #include <iostream> …

Member Avatar for WaltP
0
2K
Member Avatar for rekedmc

Hi, I need help with my assignment. Basically I have to make a html page and have the output display in a .cgi file. I am able to change the font and colors in the html page but the output of my cgi file comes out in black font. I …

Member Avatar for WaltP
0
342
Member Avatar for srijan1990

c and c++ both being high level language?what's difference is found between this and what is object oriented programming in c++?

Member Avatar for mike_2000_17
-1
118
Member Avatar for tomtetlaw

I'm trying to compile a VC++ 2010 solution of two Static Library projects and I just get this (it's the build log): [code] 1>------ Build started: Project: df_debug, Configuration: Debug Win32 ------ 2>------ Build started: Project: common, Configuration: Debug Win32 ------ 1>Build started 14/02/2012 10:51:14 PM. 1> 1>Build FAILED. 1> …

Member Avatar for tomtetlaw
0
95
Member Avatar for profyou

when will the expression (std::cin>>buff) evaluate to false(0)? I have been trying to take input until empty string is entered(simply press enter) ? Is there any other way to achieve this?

Member Avatar for deceptikon
0
178
Member Avatar for stereomatching

I discover a performance pitfall of vc2010, I compile it by release mode(O2).The results are pretty unacceptable at the first time. [code] #include<ctime> #include<iostream> /* * This is a small performance pitfall I discover from vc2010, * for simplicity, I didn't separate the header file and source file. * At …

Member Avatar for stereomatching
0
168
Member Avatar for ginan

Hi all, any help would be greatly appreciated. This program is supposed to allow the user to read in a txt file with ingredients for recipes. We were asked to use the fstream and to use functions to read in the info and display it. I am new to this …

Member Avatar for ginan
0
9K

The End.