49,757 Topics

Member Avatar for
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
472
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
147
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
156
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
110
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
Member Avatar for balgarath

(c++) Ok so I understand how to use the system function, and how to output to a file. How do I pipe the output of say system("last") to a file? system() returns an int, so if I mystream << system("last") it will put an int in the file. I need …

Member Avatar for balgarath
0
159
Member Avatar for dmmckelv

I am back this week with another homework problem. My array is not working like I thought it would. My brain is about to explode trying to comprehend what is going on. This code will compile but, it won't do what I want it to. The array is supposed to …

Member Avatar for johnpeter1989
0
100
Member Avatar for balgarath

Here we go, I am working on some code to store an IP address in an object. I have overloaded operators >>, <<, and == and they are working fine with 1 problem. I am supposed to be able to cin >> ip1 >> ip2 >> ip3; but after I …

Member Avatar for balgarath
0
97
Member Avatar for Gunner54

ok, i want to know how to make a pointer in C++ e.g: i have the address 006587B8 the offset for the pointer is 18 and i want to make its value 1 006587B8 = Pointer 18 = Offset For Pointer 1 = Value I Want To Make The Address …

Member Avatar for ~s.o.s~
0
71

The End.