49,755 Topics

Member Avatar for
Member Avatar for Traicey

The code below suppose to ask a user the person's name and compare that name with the names in the file and if found it must display the name's details such as Age and gender and ask the user if s/he wants to edit the person's details if the user …

Member Avatar for Traicey
0
79
Member Avatar for myleila

[B]I have problem with dijkstra algorithm [/B] [B]I want to write it in c++ and can not describe it in c++ //[/B] [B]please help me[/B]

Member Avatar for jephthah
0
180
Member Avatar for Metalsiege

I've heard that pointers can be a pain in the butt to implement and now I know.. Basically, I'm supposed to input a last, first and middle name. Then compute the size needed for a dynamic array to hold the full name. After that dynamically allocate the array, check DMA …

Member Avatar for Metalsiege
0
84
Member Avatar for buddy1

I have to find the largest item in an arry as a recursive function. Can't seem to get it right. Any ideas. [CODE]#include <iostream> using namespace std; int maxArray( int anArray[], int n ); int main() { int anArray[4] = { 1, 6, 8, 3 }; cout << "the largest …

Member Avatar for Duoas
0
107
Member Avatar for Jennifer84

I have a wondering. I am using something called ZedGraphControl to draw a Graph. I have managed to do all this work, to draw a Graph out of different values. The problem is that if I have drawed a graph and change some values and draw a Graph again, the …

Member Avatar for Jennifer84
0
112
Member Avatar for janicecbeginner

Hey all! I am trying to build this code and I am running into a bit of trouble. Visual c++ gives me this error: >Profile.cpp 1>c:\users\janice\documents\visual studio 2008\projects\assignment6\assignment6\profile.cpp(101) : error C2027: use of undefined type 'Post' 1> c:\users\janice\documents\visual studio 2008\projects\assignment6\assignment6\profile.h(6) : see declaration of 'Post' 1>c:\users\janice\documents\visual studio 2008\projects\assignment6\assignment6\profile.cpp(101) : error …

Member Avatar for VernonDozier
0
184
Member Avatar for darklogan

Hi there guys: For my OOP class I had to do a game (as usual, as I could see from other posts). I chose doing the traditional "memory" game where you have pairs of images scrambled in a grid and you have to choose the right pairs, until they all …

0
36
Member Avatar for zoner7

So I decided that I wanted to make a Sudoku creator and solver for fun. My plan is to fill a sudoku board with random, however, compatible answers using brutefruce. I simply check random numbers against the two prerequisite rules for a legitimate Sudoku: a given cell cannot contain the …

Member Avatar for Duoas
0
158
Member Avatar for Nameste

alright, i'm just learning c++ and i've put a code in to find the square of a number this is the code i used; [ICODE]#include<iostream> void main() { char cReply; int iNum, iSquare; std::cout << "Do you want to find the square of a number (y/n)?"; std::cin >> cReply; while(cReply …

Member Avatar for Nameste
0
116
Member Avatar for Jennifer84

I have declared a vector like this for managed type. My question is how it is possible to declare a number of elements as you do for native like this. OneVector(10) ? If I write OneVector(10) below this will not work. Either if I write OneVector.AddRange(10). Thanks... [code] public: System::Collections::Generic::List<double> …

Member Avatar for Radical Edward
0
103
Member Avatar for savinki

I tried to initialized const char pointer to pointer variable. Following is the way i did it.but once i run the program it thows an error(Pops up "encountered an problem and needs to close... Tell microsoft about this problem...") const char * FB="test"; const char **Feedback ; Feedback = &FB; …

Member Avatar for Salem
0
91
Member Avatar for Hockeyfreak889

Is there a way to make it so that a C++ file wont close while it is running?

Member Avatar for Ancient Dragon
0
58
Member Avatar for Arctic wolf

Hello everyone, I was wondering how can I make a precise delay that is shorter then 1ms on C++(I need it to drive a servo motor via PC)? If I understand correctly the standart delay function has a resolution of 1ms, so it won't do it... Thank you, A.

Member Avatar for Arctic wolf
0
118
Member Avatar for jokinjoe

Hi there, I am writing in hopes that someone may be able to tell me if there are any special components used for creating graphical eq interfaces.. (you know with a line that bends to specific Q points) I am relatively new to this... Thanks, -Joe

Member Avatar for Ancient Dragon
0
33
Member Avatar for timdog345

I need to write a program that reads a file consisting of students' tests scores in the range of 0-200. I need to break them into ranges :0-24, 25-49, 50-74, 75-99, 100-124, 125-149, 150-174, and 175-200. Then I need to Output the score ranges of the students. Also I nee …

Member Avatar for timdog345
0
135
Member Avatar for CodeBoy101
Member Avatar for wellibedamned

Is there a nice function or a way of inputing values into an array until newline? i kinda don't like doing it with gets(); and then check if index%2 is 0 and then if it is i store the int(); value of the char - 48 into a new array. …

Member Avatar for vijayan121
0
86
Member Avatar for myusernotyours

hi all, Am hell bent on creating a window that behaves like the windows taskbar in that it appears on top of the screen and all the other windows give way. Can someone suggest an API for doing this in visual c++?

Member Avatar for mitrmkar
0
74
Member Avatar for Dannyo329

I am trying to get a program so that its sort of like downloading something, when it shows you the % and stuff, in which it goes up. I've been trying to get it to work, but what I done always doesn't seem to work. And I was thinking if …

Member Avatar for Alex Edwards
0
84
Member Avatar for VernonDozier

Some similar recent threads have reminded me that I've been wanting to ask this for a while. I would like to declare a 3-dimensional array that uses contiguous memory so that I can calculate memory offsets from the base array element ([ICODE]x[0][0][0][/ICODE]) and use pointer arithmetic to access any array …

Member Avatar for Prabakar
1
2K
Member Avatar for Gibbie

Howdy all. I'm only in college for programming and am only in the my 3rd month of C++, and I'm working on a program now, just for fun and practice, and need some help. I'm making a MineSweeper game that will run in Command Prompt by making a grid of …

Member Avatar for Alex Edwards
0
104
Member Avatar for savinki

can someone please explain whats wrong with the below code segment? My intention is to assign characters in pointer "p" to pointer "a" one by one until the end. but this throws run time exception. I want to do assign character by chater without assigneing the entire pointer as a …

Member Avatar for Ancient Dragon
0
111
Member Avatar for zawpai

Hi, Why I get the errors when using 'friend function'? [CODE=cpp] // friend function as bridges on two different objects #include <iostream> using namespace std; class alpha { private: int data; public: alpha() { data = 3; } friend int frifunc(alpha, beta); // friend function }; class beta { private: …

Member Avatar for zawpai
0
120
Member Avatar for msupstream

Hi, I am currently using a C++ library (live555) to which I have added my own subclass, and this work is my first experience with C++. I need to get access to a pointer that is a private pointer in the parent class. Because I am using an exisiting library …

Member Avatar for msupstream
0
184
Member Avatar for mustafaneguib

hey guys, how are you all. i am having a little problems in linking my files. i am using gcc compiler. the command line that i use is g++ -c player.cpp to create the first object file player.h [CODE=c++]class Player_Type { private: int id; string fname; string lname; string team; …

Member Avatar for mustafaneguib
0
163
Member Avatar for _Nestor

I keep getting errors when i try and use the vector class I have an object vector<CSquare*>m_OldSquare; however when i try and add elements to the list [code] CSquare** tempArray = m_FocusBlock->GetSquares(); for(int i=0; i<4; i++) { m_OldSquares.push_back(tempArray[i]); } [/code] I get this error unresolved external symbol __imp___CrtDbgReportW referenced in …

Member Avatar for mitrmkar
0
76
Member Avatar for scream2ice

i've created a linked list which stores some info about documents such as code,title,creator,filename,... i've also stored some info about some other documents in a *.txt file i've got a search function in my program that gets a code from the user and tries to find that code either in …

Member Avatar for joshmo
0
121
Member Avatar for joshmo

I want to declare my linked list as external in my header file..so that my head and current pointers are globals..i have done something like this but i dont know where the problem is..i want the values of head and current to be initialized and used by all the other …

Member Avatar for joshmo
0
198
Member Avatar for William Hemsworth

Hi I am trying to make function which returns a substring as a [ICODE]char*[/ICODE], but [ICODE]string::substr[/ICODE] returns a [ICODE]const char*[/ICODE]. So I have managed to make a function that will return a substring as [ICODE]char*[/ICODE], except when I was comparing the speed of the two, I found that [ICODE]string::substr[/ICODE] was …

Member Avatar for William Hemsworth
0
241
Member Avatar for Alex Edwards

Hello, I'm having an issue with a line of code that really doesn't seem that it should be giving me an error. Before posting, I've googled this error and looked at related links with no help whatsoever. Most of the "solutions" were for correctly-placed brackets or different names (since some …

Member Avatar for Alex Edwards
0
2K

The End.