49,757 Topics

Member Avatar for
Member Avatar for Ninabox

I need to run simple tests on a Linux cluster fro parallel programing. I have used only C++ before, but this Compositional C++ is not that good idea as I thought at first. I have read that there is also MPI libraries and High performance Fortran, but I have no …

Member Avatar for Ninabox
0
118
Member Avatar for vvtc

Hi, What is the dynamic array equivalent to this? int *array[10] --- int *array array = new int[10] I want something like the above, but I can't seem to figure out the correct way to do it Any help would be appreciated! Thanks!

Member Avatar for grumpier
0
144
Member Avatar for lmastex

Hey guys. I'm just trying out something with the fstream library. In the next code, I'm trying to read from the beginning of the array (num1) and from the end of the array (num2) the file I have as an "entry" called "entrada.txt", which has the numbers 1 up to …

Member Avatar for vmanes
0
115
Member Avatar for vidit_X

This is strstr() function made by me as given in the practice problem. [code=c++] char *cstrstr(char s[],char ss[]) { int l1,l2,i,j,k,flag=0; char *p=NULL; l1=strlen(s); l2=strlen(ss); for(i=0;i<l1;i++) { //cout<<"i:"<<i; p=&s[i]; if(ss[0]==s[i]) { for(k=i,j=0;j<l2;j++,k++) { //cout<<"j:"<<j<<"k:"<<k; if(ss[j]==s[k]) { flag=1; continue; } else { flag=0; break; } } } if(flag) return p; } …

Member Avatar for ArkM
0
138
Member Avatar for bunty071

actully hv some problem in creating an assigment in my college assigment is about to draw a flow chart of online shooping frist to show the avaliable online shopping things then about shopping cart and at last calculation of all the bill :( i m vry much helpless

Member Avatar for vmanes
0
93
Member Avatar for monogana

assigning the address of a variable in c++ hi all, im very new to c++ and programming, googled this but couldnt find an answer if i want a instance of a variable, i can do this int a = 10; int & b (a); so now the address of both …

Member Avatar for Ancient Dragon
0
158
Member Avatar for vijaysoft1

my program is [ICODE] class stack { protected: int tos; int store[10]; stack() { tos = 0; } public: void push(int x); int pop(); }; void stack::push(int x) { cout<<"put the values into stack"; store[tos++] = x; } int stack::pop() { cout<<" get the values from stack "; return store[--tos]; …

Member Avatar for mahlerfive
0
85
Member Avatar for alecho

Hi!, i'm writing from Argentina. I need your help! I'm doing a project for the university and i have to make a Restaurant management. Well that´s not the problem. I have to log into the software, so i need to read from a file that have the user and password. …

Member Avatar for Ancient Dragon
0
115
Member Avatar for jianxu

Hi, I am currently working on a homework assignment with the topic being a boggle game. We are creating the boggleboard class and one of the function that must be included is this: bool playWord (string word, string player) This method returns false if word does not appear in the …

Member Avatar for VernonDozier
0
493
Member Avatar for bobbleheadbuu

Hi im trying to make a packet filter in C++. The only point of it is to drop all packets sent and recieved, or allow all packets sent and recieved. And I need it to turn on and off by pressing F9. Can someone help me on maybe how to …

Member Avatar for Ancient Dragon
0
67
Member Avatar for Shaftage

This is the problem I need to solve. It comes directly out of a C++ Programming book: [QUOTE]A right triangle can have sides that are all integers. A set of three integer values for the sides of a right triangle is called a Pythagorean triple. These three sides must satisfy …

Member Avatar for Ancient Dragon
0
144
Member Avatar for vijaysoft1
Member Avatar for anjoz

Make a program so that the function main is merely a collection of function calls. Your program should use the following functions. a. Function openFiles: This function opens the input and out files, and sets the output of the floating point numbers to two decimal places in a fixed decimal …

Member Avatar for vmanes
0
320
Member Avatar for jks1234

Its an exact change program but the output is not right. I don't know whats wrong in it. Can somebody please help me with program. #include <iostream> using namespace std; int main () { int twenties, tens, fives, singles, quarters, dimes, nickles, pennies; double purchase, pay, rempay=0; cout<< "please enter …

Member Avatar for entei
0
179
Member Avatar for daviddoria

I have been using GSL, but I find it very awkward to work with. Does anyone have a recommendation for another one to try? I can't seem to find any on google. Thanks, David

Member Avatar for daviddoria
0
151
Member Avatar for kneiel

[CODE] class A { int x; public: A(){} ~A() { cout<<this<<endl<<"bye"<<endl; } }; int main() { A a; a.~A();//bye return 0; // after return 0, destructor will be called and bye will be printed again } [/CODE] the destructor gets called twice. The 1st time, its explicitly called and the …

Member Avatar for vijayan121
0
83
Member Avatar for kneiel

what is the difference between a class declaration and a class definition ? Is it that a class which contains the prototypes of member functions is a class declaration? Is it that a class with member functions defined within the class , is a class definition ?

Member Avatar for grumpier
0
414
Member Avatar for kneiel

why is the size of an empty class 1 byte ? does the compiler add some null byte ?

Member Avatar for mitrmkar
0
72
Member Avatar for micheal_lobster

Hye there.. I just want some ideas to make my program better.. Below is the code. Any comment or recommendation are appreciated. :) [CODE]/* * Name: Isihan dan Carian [Sorting and Searching] * version: 4.0.1 * Copyright © * Support: http://tempek.net78.net * Updates: August 27, 2008 * Compiler : Dev-C++ …

Member Avatar for Salem
0
258
Member Avatar for TheBeast32

Hi, I'm using Expat to parse XML, and I have an array of attributes for an element. I need to be able to loop through them all, and get their values, I don't know the array size, and it's a multidimensional array, so I couldn't do [Code=C++] int count = …

Member Avatar for vmanes
0
97
Member Avatar for LiquidScorpio81
Member Avatar for slytherfreek

I'm having trouble reading from my files properly. the files being read from is in this format: Q:3 D:4 N:1 and that is all in the file, it stands for quarters, dimes, nickels. yeah and the function i have to read from that is this: [code=cplusplus] void initialize (ifstream& soda, …

Member Avatar for slytherfreek
0
111
Member Avatar for xcesmess

I'm having a little bit of trouble using the ifstream 'get' command. When I say trouble I mean it is not returning the values expected and I need a little guidance, if you will :). Basically what I'm doing is reading a file in through C++ and then going to …

Member Avatar for xcesmess
0
1K
Member Avatar for yuriythebest

ight - I have the directory to my app stored in HKEY_CURRENT_USER/ Software/myAppName how do I read it? I've tried searching the RegGetValue but couldn't get it to work/ understand how it works.

Member Avatar for yuriythebest
0
61
Member Avatar for Fragmad

Hello all. I'm pretty new to C++ but not a total beginner. I have done a little program which basicly is a Timer. It's a clock that starts at zero and counts to 4min 45sec, then it playes a sound and restarts. I want to add a feature which restarts …

0
60
Member Avatar for shipeshipaca

I have been using the book beginning c++ through game programming witch has been a very good book. I've learned loops, references, pointers, classes, inheritance, dynamic memory, and the very basics. Now I need a book that will help me make programs that do things outside of the console window …

Member Avatar for Alex Edwards
0
276
Member Avatar for LiquidScorpio81

#include<iostream> using namespace std; void BubbleSort(int ar[10], int n, int & compare_costs, int & swap_costs) { int t; int swaps=-1; while(swaps) { swaps++; compare_costs++; for(int i=0; i<n-1; i++) if(ar > ar[i+1]) { t=ar; ar=ar[i+1]; ar[i+1]=t; swap_costs=swap_costs+5; } } } int main() { int n, compare_costs, swap_costs; int ar[10]; int *bs …

Member Avatar for VernonDozier
0
997
Member Avatar for amrith92

Hello, Now, this may sound stupid, as it concerns basic file I/O, but my code doesn't work correctly- at least it isn't doing what I want it to. I wanted it to write a file the first time it runs, which it does perfectly, and every time it is run …

Member Avatar for amrith92
0
118
Member Avatar for milonimim

how can i access a direct (absolute, not the offset) memory address? here is what i tried: wrote a program that ask's for an address from the user, creates a FAR pointer to that adress and shows it. then the user can increment/decrement the value in that address by pressing …

Member Avatar for Salem
0
155
Member Avatar for sciwizeh

hello, google, daniweb, and microsoft searches didn't help me with this so i hope that someone here will know. i'm trying to have a method called at a fixed interval of time from the time an application starts until it ends ( RedrawWindow() ). i know how to do it …

Member Avatar for sciwizeh
0
206

The End.