49,761 Topics

Member Avatar for
Member Avatar for lochnessmonster

say i execute an windows api function in my code to allocate memory in the specified process! How do i actually view/know this worked without checking getlasterror() or return codes? is there any other way i can do this in a easier/better manner? maybe runtime with a debugger? if so …

Member Avatar for Ancient Dragon
0
82
Member Avatar for yuugib

Hi again guys, last time I posted a problem I got a lot of help... and here I'm back again with new issue. This is the assignment: [QUOTE] Contains a function called sumN() which takes an int n as an argument and returns an int which is the sum of …

Member Avatar for penguins10
0
558
Member Avatar for Hayzam_#include

hi I wonder who is the smallest boy to know any low level programming language Eg:C++ or java etc exept the qbasic

Member Avatar for jonsca
-2
178
Member Avatar for sirko

I need to calculate the value of sin(sin...(sin(x))) for n times (n and the value of sin are input from the keyboard). That's is what I've came up with. #include "stdafx.h" #include <iostream> #include <math.h> using namespace std; double multipleSin(int n, double x); using namespace std; int _tmain(int argc, _TCHAR* …

Member Avatar for Bench
0
175
Member Avatar for terabyte

Hello I'm starting to learn c++ and I'm wondering if I should wait until c++0x standard is published (since I'm not in a hurry, currently learning Perl and Java) or should I start learning c++ with an old book I have If i do learn c++ w/ the 2003 standards …

Member Avatar for Bench
0
145
Member Avatar for GHETTO COWBOY

hi, In short I need to create a word search puzzle. I ask the user for the dimensions and words to be inserted. The hardest part is that there is a 50% chance the word should be forwards or backwards, then there is a 25% chance the word should be …

0
48
Member Avatar for EMUPHY

I just started writing C++ and i only know the basics, if there is anyway to improve my simple caluculator or if you have any functions I could add to it let me know. Here is the code I wrote feel free to take bits. #include <cstdlib> #include <iostream> #define …

Member Avatar for Nandomo
0
214
Member Avatar for Malaisary

Hello, I want to sort a 2dim array by columns, but there is an error in my code. It doesn't accept value of element from 2dim array into C[x]. Can anybody help please? [code=C++] static int counting_sortx( int** A[], int** B[], int k, int rows, int col){ /*Array A[ ] …

Member Avatar for jakoub
0
202
Member Avatar for spetro3387

I am working on some image processing ideas and I want to implement them using pthreads. Here is an example I came up with just to make sure that the threads were actually doing what they were supposed to be doing. It just increments the values in an array and …

Member Avatar for spetro3387
0
228
Member Avatar for mrnutty

[B]Problem statement:[/B] Give two sets [TEX]A[/TEX] and [TEX]B[/TEX], devise and algorithm that checks if A and B are [URL="http://en.wikipedia.org/wiki/Disjoint_sets"]disjoint[/URL]. The following information are given about the set [TEX]A[/TEX] and [TEX]B[/TEX]: [LIST=1] [*][TEX]|A| = |B| = n[/TEX], that is number of elements in both sets are n [*]A and B are …

Member Avatar for arkoenig
0
100
Member Avatar for Nathaniel10

I am developing my own project for the practice. I am having a great deal of difficulty conceptualizing the classes I want. The scenario is that of 2 countries, each capable of producing 2 goods, using 2 factors of production. Specifically, Lower Mongolia and Upper Mongolia have certain amounts of …

Member Avatar for Nathaniel10
0
120
Member Avatar for tagazin

Hello, I'm trying to realize a simple calculator but when I double click the file.exe to see the output, my program keeps running in the terminal, maybe I created an infinite loop.. I'm using cin.get() I don't understand.. I compiled it with G++ (MinGW), using Win Xp. can someone help …

Member Avatar for tagazin
0
348
Member Avatar for dancks

I'm new to c++ so please take things slow with me. I heard in class that dynamic arrays like in java aren't supported so I thought as an exercise I would make a program that sort of acts like a dynamic array. I'm using a mac btw. For some reason …

Member Avatar for Fbody
0
183
Member Avatar for tas10

[B]This is my input assigned[/B]: // ID Name Address St Zip Majr Minr Rk QCA AltQCA Crd Hrs 135792468 Wayne,John Duke 101 Hollywood Way CA 40815 CS MATH 10 3.2667 4.0000 49 15 [B]this is my code thus far:[/B] [CODE]#include <fstream> #include <iomanip> #include <string> #include <cmath> #include <iostream> #include …

Member Avatar for tas10
0
250
Member Avatar for knellgust

[CODE]#include <iostream> using namespace std; const int SIZE=30; const int bSIZE=3; void Initialize(struct Book*[], int size); struct Book {string title[SIZE]; string author[SIZE];}; int main() { int choice1, choice2; string title; string author; Book *arrbook[bSIZE]; Initialize(arrbook,bSIZE); system ("pause"); return 0; } void Initialize(struct Book *[],int size) { for(int i=0; i<size; i++) …

Member Avatar for knellgust
0
164
Member Avatar for SVSU_Student

Good Morning DaniWeb users, This will be the first time I use your forum to try and solve a problem. I'm an non-traditional student and live in Michigan. For those curious about where that is located; look a world map (for our international friends) and look for the United States, …

Member Avatar for Frederick2
0
343
Member Avatar for stereomatching

Below is my code [code] template<typename iterator> void selSort(iterator begin, iterator end) { iterator minIt = begin; iterator it2 = begin + 1; for(iterator it = begin; it != end; ++it) { minIt = it; for(; it2 != end; ++it2) { if(*it2 < *minIt) *minIt = *it2; //line X } …

Member Avatar for stereomatching
0
294
Member Avatar for ironmancpp

Hi everyone! I am a class XII student. I have been asked to make a project using c++. I have decided to make a word game. The game's objective is: * show a random jumbled word stored in a file * ask the user to enter any valid words that …

Member Avatar for mtbs1826
0
237
Member Avatar for Nemoticchigga

Has anyone ever gotten an error saying "the specified file is an unrecognized or unsupported binary format" in regards to starting a library?

Member Avatar for thready
0
64
Member Avatar for pooja_singh

hi!! i,ve written d program on airline reservation .... but i m facing problems regarding the value of seats ... that is how do i sore different values of seats available in diff flights [code] class air { protected: int z; char clas[10]; char source[5][10]; char dest[5][10]; int seats; int …

Member Avatar for sai shiva j
0
1K
Member Avatar for shanebond

Hello everyone i'm new to this kind of things plz help me to solve this , if anyone can post the c/c++ code also i shall be thankfull to you :) An eccentric doctor visits his patients in order of decreasing age. Patients entering the waiting list specify not only …

Member Avatar for peter_budo
-1
713
Member Avatar for barevhayerable

hello people.. I really need help... I want to debug my program in the way to see each variable.. I have a huge while {...} and in that while something goes wrong.. I have to generate numgers.. the excercise is called hotter, colder... I got 2 .cpp files and 2 …

Member Avatar for jonsca
0
91
Member Avatar for codemogul

someone please help me with printing out body parts... read in word from list..user inputs letter.when correct letter is place on line..else ..im stuck here..cannot print out body part when input is wrong.. [CODE]#include <iostream> #include <fstream> #include <iomanip> #include <string> #include <ctime> using namespace std; void pickword (); int …

Member Avatar for mtbs1826
0
91
Member Avatar for madilexi

Hello all. I'm a first year C++ student and I'm going cross-eyed trying to figure out what's wrong with this code that I've started on. I need a little help understanding parallel arrays. The program is supposed to let a user input their Student ID. From there, it will either …

Member Avatar for jonsca
0
138
Member Avatar for hq1

Hi so I have this program to find the largest odd number from an array of 50, the program runs fine, but the problem is after reading the numbers from file it says the largest odd number is 0. Can some one please have a look for me and tell …

Member Avatar for spetro3387
0
2K
Member Avatar for Kosithc

Hello, I have 2D matrix with greyscale image data, in particular point I have computed vector, which contains gradient in this point (via Sobel operator, it has 2 values - difference in x and in y axis), and I store this gradient vector like perpendicular vector to this gradient, so …

Member Avatar for spetro3387
0
163
Member Avatar for Bri426

I've written a program that takes a file, students.txt, which is constructed as such: Student1 name test1 score test2 score test3 score Student2 name test1 score test2 score test3 score etc. The program has three functions, one that reads the file, one the prints the file and one that sorts …

Member Avatar for jonsca
0
148
Member Avatar for arun_l

I'm trying to cross compile a source for Tilera and I got the following error while linking. All these errors are related to C++ STL(Standard Template Library). Is there any difference in linking process of a STL library. Errors are: gtpu_t. a: In function `stlp_std::_Atomic_swap_struct<0>::_S_swap(unsigned int volatile* , unsigned int)': …

Member Avatar for HaroldR
0
178
Member Avatar for phoenix1095

hello there guys, was wondering if anyone could help me,im new to C++ and at the moment im trying to make an array of people which then has either an array or list of other variables, it would be an array of people (this would have their details such as …

Member Avatar for arkoenig
0
185
Member Avatar for hzp

[B]Edit: that was my mistake. i placed the codes in wrong line. i solved it by myself already. thanks for viewing.[/B]

Member Avatar for jonsca
0
132

The End.