49,766 Topics

Member Avatar for
Member Avatar for evanovan

is there a manipulator in C++ that do that ? if not how can i cout my numbers formatted that way . if the number is larger than 999.99 i want to put a comma after the first 3 digits and after the 6 digits ..etc x = 99456 Example …

Member Avatar for evanovan
0
174
Member Avatar for hey.howdy

[CODE] // a code to produce matrix style affect #include "stdafx.h" #include<iostream> using namespace std; int modulus(int Number, int number); char getchar(int lowerlimit, char a, int upperlimit); int modulus(int Number, int number) { int q=Number/number; return Number-(q*number); } char getchar(int lowerlimit, char a, int upperlimit) { return (a+modulus(lowerlimit,upperlimit)); } int …

Member Avatar for histrungalot
1
131
Member Avatar for Hoff123

The code can do the talking. main.cpp [CODE] #include "test.h" #include <iostream> #include <string> #define NL "\n" //"NL" = "New Line"(move the pointer to the next line) #define SL "\n\n" //"SL" = "Skip Line"(move the pointer 2 lines) int main() { Cool_Object.cool_function(); return 0; } [/CODE] test.h [CODE] #ifndef TEST_H …

Member Avatar for ItecKid
0
224
Member Avatar for davi0011

Hi I was wondering why I have an error in this program every time I try to do a long encryption. For example, encrypting an ebook or long document. I only occurs in the advanced encryption and advanced decryption functions. I'm pretty sure it has something to do with memory …

Member Avatar for davi0011
0
352
Member Avatar for jaskij

I have to write an interpreter for tristate logic as a Uni assignment. I got most of the things down, like expression tree and such, there is just one thing that's bugging me, that is input, or a particular part of it. The thing is, in the expression there can …

Member Avatar for jaskij
0
113
Member Avatar for rfrapp

For my final project in school, I want to create a platforming game, and I want to create UML for the game before I actually do any coding. However, I'm not sure where to start, as I haven't done much with UML. Any suggestions to help get me started?

Member Avatar for jaskij
0
175
Member Avatar for jigglymig

I need to create ever possible binary tree and then count the comparisons an example is if I had a binary tree with 1 and 2 then there are 4 possible binary trees... root = 1 LChild = 2 root = 1 RChild = 2 root = 2 LChild = …

Member Avatar for mrnutty
0
172
Member Avatar for Crow13

Hello. Here is da story why i wanna make this script. Play CS, and on the server theres this Math mod. In short it gives ya a 3 number equation, 1st to type in the answer get 1500$. And if your alive hard to count =\. So decided to make …

0
87
Member Avatar for jwill222

Below is the link to a picture of the debug error window [url]http://www.flickr.com/photos/76298377@N02/6798897020/in/photostream[/url] It's a program that i'm doing and I keep getting this error here's a link to the programming problem. Its' Number 3 [url]http://books.google.com/books?id=bSy1hBCLNl8C&pg=PA335&lpg=PA335&dq=sales.dat+c%2B%2B&source=bl&ots=mmN9b4WzsN&sig=miAD8-u4ly8K1Mou9ZNHv90Nscc&hl=en&sa=X&ei=2wdQT_-4OtSCsgK-l5WyDg&ved=0CDcQ6AEwAg#v=onepage&q=sales.dat%20c%2B%2B&f=false[/url] Why am i getting this error. I'm clueless [CODE] #include <iostream> #include <string> #include<stdio.h> …

Member Avatar for Ketsuekiame
0
114
Member Avatar for Labdabeta

I have the following collision detection function that checks the collision between the line defined by lstart -> lend and the triangle defined by points a,b and c with a normal of nvec. I want to know if it will work and what to put into the missing part. (it …

0
75
Member Avatar for sujan.dasmahapa

I am loading an extension dll from my mfc client application, when click on the menu first time the dll dialog is being loade and after i exit or close the dialog, and again clicking on the menu to load again it's giving error that "A required resource was unavailable". …

Member Avatar for sujan.dasmahapa
0
390
Member Avatar for tpoole00

Ok, so basically the program runs, compiles and everything. But, after you run it, u will see the problem. When i run it it I cannot display the original entered information. I am new to this and I have tried a few things, but everything I try seems to mess …

Member Avatar for Banfa
0
127
Member Avatar for _Nestor

Hi I'm wondering how you would write a function that could iterate through any stl container so it didn't matter what you were using e.g list, vector, deque and found an item that matched in that list so the function declaration would look something like this [CODE] template <class TypeList, …

Member Avatar for _Nestor
0
256
Member Avatar for triumphost

I'll get straight to the point as it's very difficult to do since I haven't found the answer on google or anywhere else. [CODE] Class ArrayOfTypes { vector<MyType> P; &MyType operator [](int I) = (MyType& PT) { if (P[I] != PT) { P[I] = PT; } return P[I]; } } …

Member Avatar for Banfa
0
259
Member Avatar for randrum1707

Hello, I'm trying to overload an indexing operator and I'm running into issues with a vector (3 dimensions). Here is what it should do: [CODE]operator[] The indexing operator should be overloaded to provide accessor methods for the class. Subscript 0 should provide access to the x component value of the …

Member Avatar for triumphost
0
310
Member Avatar for livinFuture

Hello all. I am having difficulty getting my program to output data correctly. I have a class member function that is supposed to return the value of a specific member of a struct element based on identification with its (the struct element's) other members. [code] float MatrixType::valueAt(int i, int j) …

Member Avatar for livinFuture
0
202
Member Avatar for Vasthor

in coding, how do you actually track down the bug??? example this code where we want to find the quartile.... ignore the "odd" part, not done on there yet, but the even part just successfully running but produce no result after input (0, random huge number, and another 0) [CODE]#include …

Member Avatar for mike_2000_17
0
106
Member Avatar for therockon7throw

The puzzle The original puzzle is in Java [url]http://wouter.coekaerts.be/2012/puzzle-clowns[/url], so I tried to write it in C++ and post it here for your, so that you solve it and having some thing to think:-) There almost aren’t any rules; any cheating inside your code is allowed; it is the whole …

Member Avatar for therockon7throw
0
195
Member Avatar for triumphost

Is it Dangerous to Derive from STD? Specifically std::string. Why I'm asking? I want to write a class that extends the functionality of std::string and a couple other std structs/classes.. So that when I do something like: String M = ""; M.Explode(........) it'll do the functionality in my class below. …

Member Avatar for mike_2000_17
0
100
Member Avatar for ItsAdZy

I would like the user to be able to see the sales total for any given month when they input a valid month. Everything works other than what I stated above. I am completely stumped on how to store the salesTotal values inputted by the user into an array (monthSalesTotal). …

Member Avatar for WaltP
0
173
Member Avatar for Vladnaka

Is there any way to use standard C++ to wait for user input? And by input I don't mean just the enter key, I mean ANY key will continue executing code. I know about the conio.h and Windows.h libraries but those aren't standard C++ and I really want to get …

Member Avatar for jaskij
0
250
Member Avatar for jigglymig

[COLOR="green"][B]I already have counting the number of elements programmed, which was fairly easy, but now I am confused with the comparisons. how exactly would I program this exactly? please help me understand what exactly to do bc the wording is really confusing me[/B].[/COLOR] Problem Statement In order to compute the …

Member Avatar for jigglymig
0
163
Member Avatar for tom12

#include <iostream> #include <string.h> #include <ctype.h> using namespace std; int main() { char clear[200]; char cipher[200]; int x,i; cout<<" Enter a string:"; cin.getline(clear,sizeof(clear)); x = strlen(clear); for(i=0;i<=x-1;i++) { cipher[i] = clear[i]+3; } cipher[x] = '\0'; cout<<" Encrypted:" << cipher << endl; system("pause"); return 0; } Hey Guy i'm new to …

Member Avatar for tom12
0
135
Member Avatar for triumphost

How can I get a variable amount of arguments in a function without providing how many arguments will be passed? For example, when you use a VA List, the first parameter must be the amount of arguments passed.. I don't want that. I want to just start passing any amount …

Member Avatar for deceptikon
0
521
Member Avatar for triumphost

I have: [CODE] private: Void GoBtn_Click(Object^ sender, EventArgs^ e) { ((WebBrowser)MultiTab->SelectedTab->Controls[0]).Navigate(SearchBar->Text); } [/CODE] But it keeps giving me an error at Controls[0] and telling me that no operator [] matches.. Control::Collection^ [int] <--- No clue what that line means.. Next it tells me that I cannot cast TabControl to (WebBrowser) …

Member Avatar for therockon7throw
0
103
Member Avatar for butler273

Howdy all. I'm having an issue tackling my assignment. my givens are I have an int pointer, which is supposed to point to an array of values. This pointer is in a private part of my class. However, I have a specific set of values I want to pass in, …

Member Avatar for Labdabeta
0
161
Member Avatar for Mona..

Hi everybody.. I have this error messages: linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/calendarType.exe : fatal error LNK1120: unresolved externals Error executing link.exe. I do not know what to do please help!!! thnx..

Member Avatar for jaskij
0
94
Member Avatar for triumphost

How can I do the following? I read up on Variable Arguments last time I asked this question (Mike pointed me in the right direction).. but it still does not let me define any number of them.. I Do not want to specify the first parameter and if I do, …

Member Avatar for triumphost
0
212
Member Avatar for Mindless Z

I've got an assignment due very soon that I can't for the life of me figure out. the basic idea is to create a program that allows the user to paint with large dots. If the R key is down the dot should be red, if the B key is …

Member Avatar for Mindless Z
0
451
Member Avatar for Suzie999

I got a warning from vs2010 at compile time (C4172 returning local variable or temp) [CODE] int foo(){ int* bar = Bar() } int* Bar(){ int array[2]; array[0] = 1; array[1] = 2; return array; } [/CODE] if I understand the reason for this correctly, that the array 'array' in …

Member Avatar for Suzie999
0
127

The End.