49,761 Topics
| |
Hello ladies and gents, Was wondering if any of you could check this exercise out, I finished it, but, I'm not sure whether Ive got it exactly right, especially the last two definitions. The exercise is as follows: - Use typedef to define the types unsigned char, const unsigned char, … | |
ive created this currency interest preogram which should calculate the interest depending on the currency amount entered. if 100 but less than 1000 then 1%, otherwise 3% for all other amounts. can someone give me any ideas as how to start the interest part of the program off, and which … | |
This is just a brief question how would i read the attributes from the tokeniser in the same order as declaration occurs in the class declaration, separated by full-colons. Tokeniser class [CODE][COLOR=#0000ff] #include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<iostream> [/COLOR][COLOR=#0000ff]using[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"Tokeniser.h" [/COLOR][COLOR=#0000ff]const[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] Tokeniser::THROW_EXCEPTION = 0;[/COLOR] [COLOR=#000000][/COLOR] Tokeniser::Tokeniser([COLOR=#0000ff]void[/COLOR]): _delim([COLOR=#800000]""[/COLOR]), _data([COLOR=#800000]""[/COLOR]), _currentPos(0), _throwException([COLOR=#0000ff]true[/COLOR]) … | |
I have done the following, and I just want to check if I've done them all correctly: [LIST] [*]Declare a pointer variable named fp that can point to a variable of type string. [*]Declare fish to be a 5-element array of strings. [*]Make the fp variable point to the last … | |
Hi there, Im trying to create a simple program that creates an 2D array of numbers and prints them to the screen via a function. I think i have got most of the way however, I cant seem to get the print function to print correctly. It's been a while … | |
Hi, I'm relatively new to socket programming in C/C++ but i have read a few tutorials and had a good go at trying to do it. I have got to the point where i have created a kind server that will accept incoming connections and then when the data is … | |
that's it what's the relation between constructor and creating an object? many thanks. | |
Hi folkz, Need help in writing a C program..The scenario is as follows: We need to copy a log file frm the database to a txt file and the txt file should automatically get updated whenever the log file is modified... Also there shld be a facility to filter data … | |
I have the following code: [code=c]class date { private: unsigned int nDay,nMonth,nYear; static unsigned int nMonthArr[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; //LINE 36 ...[/code] Upon compilation I recieve these errors: n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2059: syntax error : '{' n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2143: syntax error : missing ';' before '{' n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2143: … | |
Hi ppl! can anyone tell me how to capture system date and o/p it later in a prog?? what function do i use?? thanks in advance! appreciate any help rendered. :cheesy: | |
I've been working on this now for a couple of weeks and am still having dificulties. I'm trying to come up with a function to compute and return the area of the quarter circle by dividing it into a given number of rectangles. I need to have it accept the … | |
Hello ladies and gents, I'm reading The C++ PL from B.Stroustrup and in chapter 5 the second exercise goes like this: What on your system, are the restrictions on the pointer types char*, int*, and void*? For example, may an int* have an odd value? Hint: alignement. I actually have … | |
Hi, I was wandering if someone, can recommend a tool that does reverse engineering I have the following problem: I have a project in C++, with a lot of classes and a lot of inheritances, I want to learn all the classes and inheritances, and If I can receive the … | |
i have compiled and run a symbian application using Visual C++. It finished building, was run and was displayed using the emulator. I wanted to do unit testing on it using C++ tool. And then i got errors which is something like this... Outbox_7000.obj : error LNK2001: unresolved external symbol … | |
hi i need help on making a recursive palindrome function of only string values. the recursive funstion shouyld return true is the string stored in the array is a palindrome, otherwise it should return false. Also the function should ignore spaces and punctuation in the string. thank you all help … | |
My program is supposed to out put 10 20 40, but it doesn't. What's wrong with it? [code] int main() { int arr[3] = { 5, 10, 15 }; int* ptr = arr; *ptr = 10; // set arr[0] to 10 *ptr + 1 = 20; // set arr[1] to … | |
[code]#include <iostream> #include <iomanip> using namespace std; struct Node { int number; char color; bool open; }; #define DEPTH 5 #define ROW 3 #define COL 6 void setNodes( Node nodeArray [ROW][COL][DEPTH]); void setNode (Node &node, int depth); void printArray (Node nodeprint [ROW][COL][DEPTH], int depth); void main () { Node nodeArray … | |
Hi everyone I am trying to get done the stocks program the first function is readStocks, it compiles but deosnt give me rigth ptompt, i guess i have some kind of execution error. Could any one give me advice on that? THank you. [code=cplusplus] //Stock's statistic #include <iostream> #include <stdlib.h> … | |
[code] #include <iostream> #include <ctime> using namespace std; // Dynamic Single Array of integers #define dAry class DynaArray { private: int SIZE; int* array; public: DynaArray(); // Default Constructor DynaArray(const DynaArray& dAry); // Copy Constructor ~DynaArray(); // Destructor DynaArray& operator= (const DynaArray& dAry); // Assignment Operator // Accessors int getSize() … | |
I need a little help calculating odds for a roulette game.. i'm not sure why someone would bet 1:1 odds.. to me, that just means you win your money back without making a profit. also, 1:1+bet back doesn't seem any different than betting 2:1.. this is how I calculate it: … | |
how to divide the given number by 3 using bitwise operators and what are other methods without using /,*,%.operators.. | |
Code [code] //God Mode }else if(stricmp(lpcLine, "!god") == 0){ bRet = false; if(ADDR_GODMODE[0] != 0x90){ BYTE godmode[] = {0x90, 0x90}; EnableHack((BYTE*)ADDR_GODMODE, godmode, 2); Echo("GodMode On"); } else{ BYTE godmode[] = {0x7B, 0x05}; EnableHack((BYTE*)ADDR_GODMODE, godmode, 2); Echo("GodMode Off"); } [/code] Error error C2109: subscript requires array or pointer type | |
I am working on eSNACC 1.7 and VC++. I want to convert the ASN.1 to noraml c++ data type and vice versa. Right now I have generated code and created the dll for the C++ files generated from ASN.1 module. But the issue is with using this dll to encode … | |
I'm a bit confused on how the precompiled header system works. I'm using Visual Studio 2005 and when trying to include multiple .cpp files in a project, they each, on compile, give me an unexpected end of file error. I have them all set to precompile a header, stdafx.h, and … | |
This is my first post - Hello everybody, hopefully you can help get on straight and narrow with regards to c++ Anyway on to question: What I need to do this is to utilize the constructor of one class in a second class - thereby optimizing the code by avoiding … | |
| |
[code=cplusplus] #include "stdafx.h" #include <iostream.h> struct MonthInfo { float totalRain; float highTemp; float lowTemp; float avgTemp; }; struct MonthInfo year[12]; int main(int argc, char* argv[]) { const int MONTHS = 12; // Change here for (int i = 0 ; i < MONTHS ; i++ ) { cout << "Enter … | |
| OK Can anyone help me understand what a tokenizer does? And why I have to put *tokenPtr? What is the * for? I am having a heck of a time figuring out how to write a program that takes the last two letters of a word in a sentence puts … |
| My while statement does not work. This program is only performing the function on the first word in the sentence. Can anyone help me get the while statement to do all of the words in the sentence? [code=c] #include <iostream> using std::cin; using std::cout; using std::endl; #include <cstring> using std::strtok; … |
so this program suppose to find number of primes (number that divides only by itself) in the given range. I know the problem is with my "for" statement.. i just cant find it :( Thank you [CODE=c]#include <iostream> using namespace std; int main() { int intStart, intEnd, intPrime; intPrime=0; cout … |
The End.