49,757 Topics

Member Avatar for
Member Avatar for lochnessmonster

Could anyone please explain what memory mapped files are and why this method is better then reading a file with I/O operations when needed? i've read msdn...wiki...and im still confused at why i cant understand how this works/ what it is doing exactly -thx

Member Avatar for rubberman
0
162
Member Avatar for codeyy

Element.h:15: error: using typedef-name ‘Element’ after ‘struct’ TrainToList.cc:6: error: ‘Element’ has a previous declaration here I understand that Element is getting defined twice but I do not know how to fix this. I must use Element as Car (or vice-versa??:confused:). Please suggest a fix to this problem. Now here are …

Member Avatar for rubberman
0
2K
Member Avatar for CrazyProgrammer

Hi all, i was wandering if someone good explain to me about clr? what are some advantages or disadvantages of programming c++ with clr, what are the main differences if there are any? If I understand it right clr programming is using the .NET framework, but could someone please give …

Member Avatar for CrazyProgrammer
0
154
Member Avatar for sha11e

1. Are memory adresses a certain size? I've seen some that have 6 characters after the 0x and some that have 8 after the 0x 2. A pointer like this: int *pointern does what exactly? Selects a location in the memory? Randomly? Or maybe like the first availible memory adress? …

Member Avatar for rubberman
0
211
Member Avatar for alex1050

What im trying is to input 'yes' to continue and reset all values or 'no' to exit the program but i have tried to figure it out but im having trouble please help.thanks [CODE]#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { float num1,result; char sym; printf("Calculator Is ON\n"); do{ …

Member Avatar for alex1050
0
218
Member Avatar for negneg

Hi I wrote a code for Galerkin Finite Element .The program runs with no error but have some problem breaking the loop also the results are all wrong .Can anyone please help me? This is my first time writting aprogram and I am so confused. #include<stdio.h> #include<stdlib.h> #include<math.h> #define Limit …

Member Avatar for frogboy77
0
176
Member Avatar for Giorgio33

I have the coordinates of n points and I need to calculate the distance between each point until the other points. 2 0 3 0 0 5 2 1 ... ... ... I am beginner in C + + and I've worked a lot before asking for help. Already, I …

Member Avatar for WaltP
0
89
Member Avatar for stavros141

Ok so I have this project in ming for along time now. Basically I have created a console app that works as a calculator by using mathfunctions from a DLL I also have created. Now the problem is I want to make it so that people can create their own …

Member Avatar for stavros141
0
186
Member Avatar for fabricetoussain

hello there, im given an assignment to basically prompt user to enter name, start time, end time, am or pm, and the pay rate and from that information i need to calculate number of hours worked and how much they get paid for the day, but im very stuck. please …

Member Avatar for fabricetoussain
0
325
Member Avatar for terexberd

Hey i wanted to know if there's a program that shows u a pattern on how they got the number if i give them 3 examples? for Ex: 1) 35777903801230601 (Encrypted) = 46071642 (Decrypted) 2) 35777903248036801 (Encrypted) = 43975216 (Decrypted) 3) 35777903508068601 (Encrypted) = 91756761 (Decrypted)

Member Avatar for VernonDozier
0
211
Member Avatar for sirpampos

I have an assignment until next week and i don't know hot to complete it In the program in c we have to help a cat escape from a dog which has double speed. The program works as follows : the data of the program are read from the file …

Member Avatar for StuXYZ
0
102
Member Avatar for user543820

Hello! I am writing a code of linked list in which user can insert or delete names but the list must remain sorted alphabetically. I have written the given piece of code by now but it is not correct. Please help me out. I took help from this link: [url]http://stackoverflow.com/questions/2941368/sorting-names-in-a-linked-list[/url][code]//function …

Member Avatar for mike_2000_17
0
279
Member Avatar for thekitoper

Hello, I am attempting to display a PDF in Gtk (C++) and don't know how. I have searched the web for a tutorial yet I cannot find one please, may someone tell me how? Thank you.

0
69
Member Avatar for dospy

what's the difference between: [CODE] // main.h #ifndef X_H #define X_H #include "point.h" // supposing that point.h contains the declaration of Point class class MyClass { private: Point m_Point; //... }; #endif // main.cpp #include "main.h" //... [/CODE] and [CODE] // main.h #ifndef X_H #define X_H class Point; class MyClass …

Member Avatar for dospy
0
112
Member Avatar for Tamlyn

Hey everyone :) I've been working on the first part of a program which I'm doing in 4 steps. Here's the first step which I have completed: Function inputAndValidate This function inputs the time. The time should be entered as two separate values for the hours and minutes. Do not …

Member Avatar for Tamlyn
0
148
Member Avatar for emreozpalamutcu

I'm making a system cleaner on C++ and what would be the best project to use? @ Windows forms application @ Empty project @ Win32 project @ Win32 Console application Note: This project has to have interface it's not console based! Reason why there is console app is you could …

Member Avatar for emreozpalamutcu
0
132
Member Avatar for davidcraigster

I'm creating a class for a text analysis for letter frequency. I am trying to compile it, but i'm having some problems. Could someone look at this for me? This is what I have so far: [CODE] class Analysis { private: string letters[26]; string text; int count; public: Analysis() { …

Member Avatar for Ancient Dragon
0
829
Member Avatar for llamaboy

Hi I am trying to store an array into a file. I have tried a few ways but I end up with an extra line at the end of the file. The only way I can do this without the line is by writing [code] ofstream myfile("Stock.txt"); if (myfile.is_open()) { …

Member Avatar for llamaboy
0
3K
Member Avatar for HASHMI007

[ICODE]/*write a program class Rectangle . the class will have two data member to coodinates of upper left & lower reght corner of rectangle. these two data member will be object of point class. 1-The rectangle class should following function. 2-A default destructor to print a messagewheneveran objectis distroyed 3-a …

Member Avatar for Ancient Dragon
1
100
Member Avatar for shyla

I am struggling with this assignment to long i need someone to tell me what am i doing wrong Write a program with three functions: upper, lower, and reverse. The upper function should accept a pointer to a c-string as an argument. It should step through each character in the …

Member Avatar for Arbus
0
1K
Member Avatar for Theanonymous

I need to write a program that calculates the squares of all numbers that are contained in a file of floating point numbers. The obtained new numbers form a new file. Like this : if the file contains the numbers 1, 2.5, 0.1, the numbers 1, 6.25 and 0.01 form …

Member Avatar for finchh
0
292
Member Avatar for Kunal Aggarwal

I made the Huffman code algorithm... and made the tree as it should be made.. The problem comes how do I print the code from the tree.. Theoretically I know the code generation.. But how to implement in C++.. Using TC. The following tree is constructed for this data [CODE]Alphabet …

Member Avatar for Kunal Aggarwal
0
150
Member Avatar for dospy

i've seen in some sources that some classes have Getters and Setters even for public data members [CODE] class Example { private: int m_ID; public: string m_Name; int m_Age; Example( ); ~Example( ); void SetName( string nName ) { m_Name = nName; } void SetId( int nID ) { m_ID …

Member Avatar for dospy
0
192
Member Avatar for Khoanyneosr

[CODE]/* Beginning Game Programming, Third Edition Chapter 4 Load Bitmap program */ #include <windows.h> #include <d3d9.h> #include <d3dx9.h> #include <time.h> #include <iostream> using namespace std; //program values const string APPTITLE = "Load Bitmap Program"; const int SCREENW = 1024; const int SCREENH = 768; //key macro #define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & …

Member Avatar for LevyDee
0
138
Member Avatar for HASHMI007

write a program class Rectangle . the class will have two data member to coodinates of upper left & lower reght corner of rectangle. these two data member will be object of point class. 1-The rectangle class should following function. 2-A default destructor to print a messagewheneveran objectis distroyed 3-a …

Member Avatar for HASHMI007
-3
86
Member Avatar for pseudorandom21

What would be a common strategy for using DLLs coded in native C++ in C#? I'm not really finding much good information about it, other than writing the DLL in C.

Member Avatar for mike_2000_17
0
769
Member Avatar for naseerhaider

I'm brand new to C++ ,I've written following code for finding a number's factorial,Can you please let me know how to write it more elegantly ? [CODE]#include <iostream> using namespace std ; main () { int num = 0 ; // declaring variables double result = 1 ; long int …

Member Avatar for naseerhaider
0
175
Member Avatar for DaniwebOS

I'm getting a LN2019/LN1120 error, and I have no clue why... any suggestions? [CODE]#include <iostream> #include <string> using namespace std; class Time { public: Time(int hour, int minute); Time(); void setHour(int); void setMinute(int); int getHour(); int getMinute(); void incrHour(int); void incrMinute(int); void printTime(); protected: int hr, min; }; Time::Time( int …

Member Avatar for Ancient Dragon
-1
135
Member Avatar for ddcc

Hi, i am trying to write a program which calculates the sum of the prime numbers below a specific limit using an algorithm called the Sieve of Eratosthenes(Wikipedia it). I am getting an error though when i run my program. It says debug assertion fail and something how the iterator …

Member Avatar for ddcc
0
169
Member Avatar for Jennifer84

Hello I have this code below where I use the method ->ReadToEnd() to read in the whole file into the String test. The thing is that I have to use the method ->ReadToEnd() in this case because I use another class that only have this functionality. I cant read line …

Member Avatar for jonsca
0
353

The End.