49,757 Topics

Member Avatar for
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
119
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
344
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
249
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
162
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
317
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
176
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
183
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
Member Avatar for TSims11

So I need to be able to close a window when I open another window... Here is my code: [CODE]private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { Form2 ^form2 = gcnew Form2(); form2->Show(); Form1->Close(); }[/CODE] All this does is close both windows... If you guys could help out a noob to …

Member Avatar for TSims11
0
274
Member Avatar for hiddepolen

Hi guys, I have a little question. When I make a dialog in Visual C++ 2010, with the Dialog Editor, you can Drag and Drop buttons, Edits etc. I can also test my dialog. The buttons and edits look very nice, the Windows 7 style. However, when I compile my …

Member Avatar for hiddepolen
0
186
Member Avatar for Vv IVIatthew vV

hey, i'm writing a piece of code and i got an error that i really don't understand. The code is below, but i had to post it all because i can't even understand the error, so i posted it all. The Error: [QUOTE]1>main.obj : error LNK2019: unresolved external symbol "int …

Member Avatar for Vv IVIatthew vV
0
280
Member Avatar for aznlitomik3

Write a program which analyzes a text file by counting the number of times each of the 26 letters in the alphabet occurs. You must use an array to keep track of the how many times each letter is seen in the text file. Uppercase and lowercase letters should be …

Member Avatar for SgtMe
0
127
Member Avatar for parth27987

Hello people, Need help with this code here. This code suppose to print blocks of char assigned by user with certain rows and column also assigned by user. For some reason it is giving me error and i don't understand what the problem is Help will be greatly appreciated. Thanks! …

Member Avatar for parth27987
0
207

The End.