49,761 Topics
| |
#include <stdio.h> #define SIZE 16 int* biggest(int *a, int count); int main(void) { int values[16] = { 47, 17, 38, 91, 33, 24, 99, 35, 42, 10, 11, 43, 32, 97, 108, -8 }; int *p; p = biggest(values, SIZE); printf("the biggest element in the array is %i\n", *p); return … | |
This is the code: #include <iostream> using namespace std; int main() { int x; cout << "Enter a positive integer: "; cin >> x; if (x <= 0) { cout << "Illegal" << endl; exit(1); } if (x <= 100) { cout << x; } else { cout << x/100 … | |
Hello everyone!!! Whow know how to determinate which Field in DBGrid is active??? | |
Im having trouble seeing this recursion function through. Say I have an 8 by 8 array how would I get the search function to "see" into the middle of the 8 by 8 array. Positions (4,4), (4,5),(5,4),(5,5). [CODE] #include <iostream> using namespace std; struct matrix { int size; int row; … | |
Hello, I am trying to get the stock count to print for each of the toys: ps3, elmo, and wii. I don't have any clue on how to do it. To print the stockcount, i created the function getStock to try to do the job. Can someone help me get … | |
[code=cplusplus] #include <stdio.h> #define SIZE 3 void swaparrays(int* a, int* b); main () { int a[3][3]={{0, 2, 3}, {1, 5, 7}, {3, 9, 4}}; int b[3][3]={{2, 8, 5}, {4, 7, 1}, {3, 9, 2}}; } void swaparrays(int* , int* ); { //How I can impement swap arrays Function???// } [/code] | |
People what do i do wrong, i'm new to the forum, but for some reason i'm not gettig any ansfers to my questions, please tell me what do i do wrong???? Thank you. | |
//I have done Until.. But it seems to have many problem with compiler// #include <stdio.h> #define SIZE 3 void swaparrays(int* a, int* b); main () { int a[3][3]={{0, 2, 3}, {1, 5, 7}, {3, 9, 4}}; int b[3][3]={{2, 8, 5}, {4, 7, 1}, {3, 9, 2}}; void swaparrays(int* a, int* … | |
How could it be possible to synchronize the computertime to ex: GMT or any timeserver on the internet ? | |
I have one *.cpp file but I cant it compile with MS VC++ ! How to compile signle .cpp file in VC++? Please help me! | |
I need help. How do you encrypt multiple lines of a text file? /********************* *Made by Jase Inc * *Made in 10/22/2008 * *Boolean Cryptography* *Using ^ operator * *********************/ #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("text.txt"); char key[65]="jaf#$%skl%#ajlf^%dlkfhasjlk@#dsgsfsfrtw"; … | |
Hello, first of all i'm glad to be a member here. Nice to be with you! I wrote a simple dum port scanner. For practicing purposes. It worked fine under linux, i ported to windows, i linked it to winsock libraries. I keep getting errors, such as C:\Documents and Settings\Fahmi\Desktop\test\main.cpp|29|error … | |
Hello can anybody recommend a book for a lazy reader like me, I've try "Thinking in C++, Volume 1, 2nd Edition Bruce Eckel, President, MindView, Inc" but i find it difficut to understand the basic there. So can anybody recommend any simple book for lazy lad | |
hi,please i downloaded text pad to use for c++ on my computer bt wen i go to the tool i cnt actually see the compile tool.please any knws what the problem is thanks | |
PLEASE SOLVE TO ME THIS PROGRAM Oman Telecommunications (OmanTel) company would like to create a simple application to compute charges for different phone calls and generate a summary report. You have been assigned to develop the application using C++ programming language. OmanTel charges its customers using the distance between two … | |
I'm developming a programm thet will use a dll forms, the problem i'm getting i have several forms in each dll, some of them have to use functions from other forms. For example, i have a DLL "Customers" which includes Customers form, Customer Selection List, which is a a different … | |
Hi, I keep getting an error in Visual Studio C++. I am trying to create a copy constructor but keep getting this error. "Windows has triggered a breakpoint in test.exe. This may be due to a corruption of the heap, and indicates a bug in test.exe or any of the … | |
The section, of my program, that has to do with the error extracts a description from an html file or site. We are to find it based on three criteria. I have two down and this third one is giving me problems. I tried to create a DescripChars object in … | |
Can it be done? cout<<"ENter name"<<endl; cin>>name; cout<<"Enter DOB"<<endl; cin>>dob; cout<<"Enter City of Birth"<<endl; cin>>city; when i try to enter "John Doe" as name the program skips and doesn't let me enter anything for dob and asks me the city input. Any help would be greatly appreciated. Thanks! | |
I try to get the events working in the datagrid for this. With this code I change BackColor from black to MediumSeaGreen. [code] dataGridView1->Rows[3]->Cells[10]->Style->BackColor = Color::MediumSeaGreen; [/code] When the BackColor is changed, should´t this messagebox appear ? It doesn´t. I have also tried the event BackgroundColorChanged. [code] private: System::Void dataGridView1_CellStyleChanged(System::Object^ … | |
Hi guys, this 2D arrays is not making sense to me. Some how I am just too confused. What am trying to do is average the rows in 2D array and average the columns in the 2D array seperately. Here is the code snippet that I have trouble implementing. The … | |
What is the way to change size in a cell in dataGridView to 8.25 This does not seem to work. [code] dataGridView1->Rows[b]->Cells[10]->Style->Font->Size = Font->Size(8.25F); [/code] | |
What wrong with this code? #include <sstream> #include <string> using namespace std; int main() { string a = ":)"; string b = "John"; int c = 2; string d; stringstream str; str << a << " Hello " << b << " bye " << c; d = str.str(); printf("%d",d); … | |
OK im ok with some baisc codeing but i cose to go a little farther and write some more in detailed stuff so i started making a few fuctions. iv done this once before, but i cant remeber what i did diffrent. The function takes a file and reads each … | |
Does CWnd::GetClientRect() include the toolbar region? Whenever i use InvalidateRect(), i pass the entire client region for repaint, inorder to retain the client window contents : [code] InvalidateRect(NULL); [/CODE] But this affects my toolbars ( my application has two toolbars. ) - they disappear. I think it is because of … | |
I am writing some code just for fun and I have a question about class objects. Lets say I have [CODE] class Alpha with member functions getBeta getCharlie getDelta and so on now inside main when I want to make calls to these functions is it necessary to create an … | |
I've been learning C++ in school for awhile now, and mainly using their version of C++. I decided to download Dev C++ so I could start making programs on my own. For the most part, they've been nothing short of cheezy and useless, tho fun (like a fortune teller that … | |
Hi everyone, First, i'm very new in c++ and also in this forum. I'm using static data memers in my class and get this error: "missing storage-class or type specifiers". why is it so? Thx for any help. this is my code: [code=cplsplus] '================Class_FHF.h===============' #ifndef Class_FHF #define Class_FHF #include <iostream> … | |
heya... ok, so i was browsing the net to find out if there's a good text on this algorithm, but i don't seem to be able to find one. people are obviously using it, but, hey, there's no info on it. the part i get is the theory on how … | |
The End.