48,986 Topics

Member Avatar for
Member Avatar for hujiba

[CODE]#include <iostream> #include <iomanip> #include <cmath> #include <fstream> #include <string> #include <vector> #include <cstdlib> using namespace std; /** Test case 1: test words that start with a vowel. When inputting the words air and ear, then outputs are airay and earay. Test case 2: test words that start with a …

Member Avatar for hujiba
0
118
Member Avatar for trantran

This is a frustating problem likely experienced by everyone and therefore there (might) be now a "perfect" solution, but my limited skills have impeded me from finding it. 1) I created a plain vanilla text_class that automatically relocates itself when needed. 2) I want to use my text_class with Win32 …

Member Avatar for mike_2000_17
0
99
Member Avatar for cijeh90

Purpose: To practice writing a simple well-documented (lots of comments) C++ program using repetition structures (loops). Assignment: The power of a repetition structure lies in the fact that a section of code can be executed several times (often using different data) in the same program run. Modify, Laboratory Assignment # …

Member Avatar for azwan91
0
308
Member Avatar for Tom_Weston

I was just wondering, how to check how many 't's there are in the sentence? [CODE] #include <iostream> #include <string> using namespace std; int main() { string test = "The man played with the ball in his backyard."; return 0; } [/CODE]

Member Avatar for mrnutty
0
102
Member Avatar for trantran

It seems easy to make sure that an object can only be created on the stack and not on the heap (by simply marking private operator new), but is it possible to do the opposite: only permitting the creation of an object on the heap (with operator new) and *not* …

Member Avatar for mike_2000_17
0
154
Member Avatar for Zssffssz

I am MAD. Google was useless in this sense. I want to make a header file/ external reusable .cpp. AND I WANT EVERY LITTLE DETAIL. I just can't find anything. I just want to put a few functions I use all the time in it. PLEASE... Great now I'm sad. …

Member Avatar for Zssffssz
0
134
Member Avatar for LevyDee

Ive been trying to understand this subject for two days now, but can't seem to get it working. My setup is two consoles, a Server console, and a server message board console. The Server message board is a child process of my Server console. The Server will send messages to …

Member Avatar for LevyDee
0
201
Member Avatar for infoJUNKIE121
Member Avatar for totalanonymity

Goals of exercise are: [LIST=1] [*]Output the value of PI (3.1419, as per exercise). [*]Prompt user to enter radius, r, and store it. [*]Calculate surface area of sphere: 4 * PI * r ^ 2 [*]Calculate volume of sphere: (4/3) * PI * r ^ 3 [*]Output the surface area …

Member Avatar for WaltP
0
3K
Member Avatar for PixelExchange

Does anyone know any good resources where one could learn GDI+ (Gdi plus) with the Win32 api? There are many resources for learning Gdi+ with MFC, but not with win32. I tried learning gdi plus with win32 on my own, but ran into the following problem: [CODE]Graphics graphics(hdc); Pen blackPen(Color(255,0,0,0), …

Member Avatar for PixelExchange
0
128
Member Avatar for leefuren
Member Avatar for cppgangster

hi, I am trying to establish a connection between two laptops, as a beginner encountered a problems that are still to be learnt, but still I would like to know. I have two app, first is server on win wista: [CODE] #include "stdafx.h" #include "winsock2.h" #include <string> #include <iostream> //using …

0
128
Member Avatar for valestrom

So I'm making this periodic table application, and spent an hour laying it all out. Perfectly I must add. Now I'm trying to figure out how to get it so when I click a button it opens the new form (Have this done) and replace the value of some labels/textboxes …

Member Avatar for valestrom
0
212
Member Avatar for dineshz

I have a problem with this code. Why this shows random symbols when i give view data ! ?[CODE]#include<iostream> #include<conio.h> #include<windows.h> #include "gotoxy.h" #include<cstdio> #include<cstring> #include<cstdlib> #include<fstream.h> using namespace std; //function declarations void out(char *); void matrix(int,int); class student { public: //class variable declaration in public part int roll,fee,ht,wt; char …

Member Avatar for VernonDozier
0
574
Member Avatar for johnnyboyslim

Why is my program failing to close? These names and phone numbers are what I am trying to load into the array and display. Yaztremski 592-48-1003 Tilden 355-71-8210 Charles 290-65-8817 Balboa 458-12-9834 Watterson 234-98-0023 Jefferson 303-41-5692 Carmichael 392-60-0932 Martin 418-77-0974 Davila 339-89-4475 Jacobs 228-42-0547 Dobbs 219-52-4058 Nastromo 628-79-2516 Rivers 611-69-7045 …

Member Avatar for johnnyboyslim
0
88
Member Avatar for pimpingreen13

Im having a hard time figuring out what is wrong with my program. I need to write a program that looks up a phone number in a file containing a list of names and phone numbers. The user is to input the first name and last name to look up, …

Member Avatar for MonsieurPointer
0
387
Member Avatar for Zssffssz

Ok in Code blocks I was commenting my code instuff and since I have a computer running xp when it is bult for winNT or win95 and a compaqu keyboard I have many tyPos, freezes, pieces of curcutry on my driveway under my window I accsedentaly typed three / in …

Member Avatar for thines01
0
201
Member Avatar for Ravic85

So, I've got my program up and running, and everything is great except my problem is I can't figure out why my output for my original balance and my output for my new balance are the same and it won't do my calculation Here is my header [CODE] #ifndef SavingsAccount_H …

Member Avatar for Ravic85
0
169
Member Avatar for totalanonymity

The homework question said to rearrange statements and remove part of code that made it calculate incorrectly. I'm lost on this and have been searching multiple places and trying different things. This is a beginning C++ class, too, so, for homework in the first half I can't very well be …

Member Avatar for totalanonymity
0
204
Member Avatar for namratag

I am new to VC++. And getting error as- error PRJ0002 : Error result 4 returned from 'C:\Windows\system32\cmd.exe'. so please tell me the solution as soon as possible. we tried following solution GoTo Project -> properties ->Manifest Tools ->Input and Output -> Embed Manifest changed Yes To No but it's …

Member Avatar for Zssffssz
0
90
Member Avatar for Zvjezdan23

Good evening all. I have a quick quick problem in my code. The build is successful but my debug shows up the errors: First-chance exception at 0x013c43e6 in week2_project1_gamephysics.exe: 0xC0000005: Access violation writing location 0xcccccccc. Unhandled exception at 0x013c43e6 in week2_project1_gamephysics.exe: 0xC0000005: Access violation writing location 0xcccccccc. The program '[9888] …

Member Avatar for mrnutty
0
325
Member Avatar for d4kkon

This is a ridiculously simple function that I just can not seem to get to work. I am getting a segmentation fault error for this every time I run it. [code] // LargestUsingPointers: receives an n-element integer array and returns // a pointer to the largest element; the function uses …

Member Avatar for mike_2000_17
0
216
Member Avatar for doomsday1216

I was recently creating a program and trying to convert a string to an int (similarly to Integer.parseInt(x) in java) and wasn't sure if there was a c++ equivalent that i could use?

Member Avatar for mike_2000_17
0
274
Member Avatar for sergent

I don't get why ISO don't include VLAs in C++ standard. C++ is supposed to be a C extension, and C99 clearly supports VLAs. It is not hard to implement and does not break any existing C++ code. It is useful for beginners, who do not yet know pointers, and …

Member Avatar for mike_2000_17
0
211
Member Avatar for newguy101

I have most of my code written but I need some help with a part of it, I need to get in one more variable and not positive how to go about it. I need to enter I as a variable for Industrial use: $1000.00 is usage does not exceed …

Member Avatar for Taywin
0
974
Member Avatar for Jennifer84

Hello I have a problem to convert a String to double. I use the below code but the messageBox show 11,07 with a Comma(",") instead of a dot(".") I beleive this depends on any regional settings on the computer. On my other computer I get the result "11.07" which is …

Member Avatar for James19142
0
177
Member Avatar for ntrncx

i do an exercise and i have 2 questions. the exercise is to take an array example from my c++ book and make it template. for start my code is this: [CODE]#include <iostream> #include <iomanip> #include <cstdlib> #ifndef ARRAY_H #define ARRAY_H using namespace std; template<typename T,int elements> class Array { …

Member Avatar for ntrncx
0
153
Member Avatar for nickyevil

um, I'm using Turbo C++ IDE with the blue screen thingy. but it won't run. i mean, whenever i try to run it to show output, it says "Error not an exe FILENAME.LIB" um, im kinda new at this, i just need it for school. how do i fix it?...:'( …

Member Avatar for elmonko
0
175
Member Avatar for Adnan671

It pretty much works fine...except for the fact that it wont output the total amount of withdrawals and deposits. I have no idea how to make it do that. Can anyone help? [CODE]#include <iostream> using namespace std; float userInput() { float balance; cout << "Please enter your current checkbook balance..." …

Member Avatar for Clinton Portis
0
286
Member Avatar for TArrington21

Having trouble trying to read characters from a file into a 2D array. I know this topic has been discussed before but your help will be greatly appreciated. I know there is more efficient ways of writing the entire code but im not that familiar with programing. Any suggestions are …

Member Avatar for TArrington21
0
127

The End.