49,761 Topics
| |
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 … | |
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 … | |
hi I wonder who is the smallest boy to know any low level programming language Eg:C++ or java etc exept the qbasic | |
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* … | |
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 … | |
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 … | |
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 … | |
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[ ] … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
[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++) … | |
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, … | |
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 } … | |
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 … | |
Has anyone ever gotten an error saying "the specified file is an unrecognized or unsupported binary format" in regards to starting a library? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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)': … | |
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 … | |
[B]Edit: that was my mistake. i placed the codes in wrong line. i solved it by myself already. thanks for viewing.[/B] |
The End.