49,761 Topics

Member Avatar for
Member Avatar for JoBe

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, …

Member Avatar for JoBe
0
365
Member Avatar for sunny123

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 …

Member Avatar for ~s.o.s~
0
282
Member Avatar for NSta

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]) …

Member Avatar for iamthwee
0
306
Member Avatar for aznballerlee

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 …

Member Avatar for JRM
0
952
Member Avatar for Goldfish691

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 …

Member Avatar for Goldfish691
0
113
Member Avatar for bops

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 …

Member Avatar for bops
0
474
Member Avatar for CleverGirl
Member Avatar for ~s.o.s~
0
122
Member Avatar for nirmala.s

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 …

Member Avatar for Ancient Dragon
0
106
Member Avatar for denn0069

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: …

Member Avatar for denn0069
0
103
Member Avatar for ReDeViL

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:

Member Avatar for dwks
0
135
Member Avatar for kurt_tna

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 …

Member Avatar for mathematician
0
114
Member Avatar for JoBe

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 …

Member Avatar for ~s.o.s~
0
345
Member Avatar for dev.cplusplus

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 …

Member Avatar for ~s.o.s~
0
112
Member Avatar for majoy

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 …

Member Avatar for Ancient Dragon
0
181
Member Avatar for d1e9v85

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 …

Member Avatar for WaltP
0
134
Member Avatar for aznballerlee

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 …

Member Avatar for John A
0
144
Member Avatar for chubbywubba

[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 …

Member Avatar for vegaseat
0
69
Member Avatar for adkozak

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> …

Member Avatar for adkozak
0
149
Member Avatar for chubbywubba

[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() …

Member Avatar for manutd
0
173
Member Avatar for Clinton Portis

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: …

Member Avatar for Bench
0
339
Member Avatar for srinivasdama

how to divide the given number by 3 using bitwise operators and what are other methods without using /,*,%.operators..

Member Avatar for Rashakil Fol
0
94
Member Avatar for Gunner54

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

Member Avatar for Lerner
0
93
Member Avatar for sameer.mastek

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 …

0
67
Member Avatar for Mr Violent

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 …

Member Avatar for Mr Violent
0
134
Member Avatar for andyww14

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 …

Member Avatar for Mr Violent
0
101
Member Avatar for jbennet
Member Avatar for AnG'

[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 …

Member Avatar for Ancient Dragon
0
157
Member Avatar for dmmckelv

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 …

Member Avatar for ~s.o.s~
0
256
Member Avatar for dmmckelv

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; …

Member Avatar for Ancient Dragon
0
111
Member Avatar for snedan

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 …

Member Avatar for WaltP
0
91

The End.