51,593 Topics

Member Avatar for
Member Avatar for Ahmed_62

Hello Everybody , i have array of size 9x9 i want to write a function to Check each 3x3 box

Member Avatar for Ahmed_62
0
304
Member Avatar for danijohn

when I exit a function i get 'general protection exception' -' processor fault'. Function writes to file and works ok except won't exit. What does this mean please, and where should I look ? Am using Turbo C 4.5 & Windows xp. Must be overwriting memory somehow I suppose but …

Member Avatar for alifriend7
0
599
Member Avatar for kearradcrs

Use an array to store the grades. Use a looping structure to populate the array. Calculate the numeric average based upon the 4 equally-weighted numeric grades. Display each of the 4 numeric grades from the array on the screen using a looping structure. Display the numeric average. Create a function …

Member Avatar for David W
0
195
Member Avatar for Hassaan_2

hi all ihave required a program any body help me please Write a programme that use three arrays mango, orange and banana to store the number of fruits purchased by customer. The programme inputs the number of mangoes, oranges and bananas to be purchase by customer and stored them in …

Member Avatar for David W
0
437
Member Avatar for Petcheco

Hello, guys. The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113 62229893423380308135336276614282806444486645238749 30358907296290491560440772390713810515859307960866 70172427121883998797908792274921901699720888093776 65727333001053367881220235421809751254540594752243 52584907711670556013604839586446706324415722155397 53697817977846174064955149290862569321978468622482 83972241375657056057490261407972968652414535100474 82166370484403199890008895243450658541227588666881 16427171479924442928230863465674813919123162824586 17866458359124566529476545682848912883142607690042 24219022671055626321111109370544217506941658960408 07198403850962455444362981230987879927244284909188 84580156166097919133875499200524063689912560717606 05886116467109405077541002256983155200055935729725 71636269561882670428252483600823257530420752963450 Find the thirteen adjacent digits …

Member Avatar for Petcheco
0
291
Member Avatar for hadisur_rahman

# we get month for (month=days/30;) years for ( years=month/12;) but we also get days for(( days=days%30, why it happend explain ??)) #

Member Avatar for rubberman
-1
241
Member Avatar for basitji

hi all friends plz help me. i have an assingment giving by sir. write a program that accepts three values from user and print the highest value from them? remember: The program should be for turbo c.

Member Avatar for rubberman
0
101
Member Avatar for Petcheco

Hello, guys. Here's the challenge: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? I wrote my code: #include …

Member Avatar for Petcheco
0
321
Member Avatar for CodeWarrior14

Hello, A simple program I am writing uses a struct to store a key and key size variable. However I get an error that states that my struct variable is being used without being initialized... I dont really know why it is telling me that. Code: `keygen.hpp` #include <ctime> #include …

Member Avatar for jencas
0
177
Member Avatar for 04279169

04279169@uofn.edu.om Do Muluplication in this program ? #include<iostream> using namespace std; class Node { private: int row;// different data type for other apps int column; int value; Node *next; // the link pointer to next item public: Node(int x=0,int y=0,int z=0,Node * ptr=NULL); // constructor int getRow(); int getColumn(); int …

Member Avatar for startomana
0
211
Member Avatar for Andrey_4

Authors of PVS-Studio static code analyzers offer programmers to test their sight and to try finding errors in C/C++ code fragments: https://software.intel.com/en-us/blogs/2015/04/24/lets-play-a-game-find-bugs-in-popular-open-source-projects

Member Avatar for Suzie999
0
200
Member Avatar for Kenneth_3

I am trying to compile the following code and I keep getting a reference error for my output file through a function. The purpose of the program is to read a file, sort through arrays, and output into a certain form. I am sure it is something small, but I …

Member Avatar for Kenneth_3
0
165
Member Avatar for Amoula_1

Hi I need a program that open a file.txt and read the content .. please help, i think the function is FileRead but i don't know how to uses it , please THank you

Member Avatar for Moschops
0
59
Member Avatar for CSprogA

basicly my project is making a shopping list which allow the user to: - type 1 to add a new shopping list - type 2 to add an item on existing shopping list - type 3 to check certain items in a certain list as bought - type 4 to …

Member Avatar for Schol-R-LEA
0
9K
Member Avatar for markdean1989

Hi, my question is very simple. Like the title says; How to declare an object? I have this declaration in my program; Class_name Object_name; and it is giving me an error, saying "Expected a ';' before "Object_name" And this is driving me nuts because putting a ';' before the object …

Member Avatar for deceptikon
0
378
Member Avatar for Erica_2

So i am back again, working with arrays this time. I can get it to run in the main but i am not sure how to make this code into a void function . #include <iostream> #include <iomanip> #include <string> using namespace std; int main () { // Declare variables …

Member Avatar for Erica_2
0
589
Member Avatar for complete

I have a silverlight app that uses TextBox XAML controls. In the c++ code-behind, IXRTextBoxPtr types are associated with these textboxes using "FindName" like this: FindName(L"ColNum3", &m_pColNum3); (where ColNum3 corresponds with the XAML CODE like this: ) Then, the code assigns the pointer like this: std::wstring wsTransfer; // gets the …

Member Avatar for complete
0
882
Member Avatar for markdean1989

I have an issue with the random generator. I use the code; myNumber = rand() % 100; //for numbers 1 - 100; My problem is, the numbers getting generated have a pattern. Such that the first output is 33, 43, 62, 29, 0, 8 ... Why is this so? I …

Member Avatar for rubberman
0
637
Member Avatar for eng.basil

write aprogram in c++ using for loop to calculate the max number and min number and make the avg >>in output screen?

Member Avatar for ddanbe
-1
81
Member Avatar for Abdul_32

i have this two dimensional array float grades size [30] [10]; my question is how to address a number for example 2 in the first row first column?

Member Avatar for ddanbe
0
65
Member Avatar for Fernando_7

Hey guys I need a push in the right direction im confused on how to iterate through this string "feeenhpoorilumayngtumseatsdmepotositnsfrlerruepsrennurdaorantiedbeunrtioradarahe" frontwords and backwards a push in the right would be pleasent if anyone can help

Member Avatar for Petcheco
0
106
Member Avatar for cypherscouter13

I have the following code int main() { compute(); return 0; } void compute() { double Ptr; vector <double> Vector; for (int u=0; u<N; u++) { computeFor(u, Vector, Ptr); Vector.push_back(EnergyPtr); } } void computeFor(int i, vector<double> &List, int u, vector<double> &Vector, double &Ptr) { int Num = List.size(); int pos[2][Num]; …

Member Avatar for rubberman
0
325
Member Avatar for hadisur_rahman

*****Describe the output in step by step with details>>>> #include<iostream> using namespace std; class A { int x,y; public: A(){x=10;y=10;} A(int a,int b){x=b;y=a;} ~A() {cout<<"X="<<x<<","; cout<<"Y="<<y<<endl; } }; int main() { cout<<"Start main\n"; A point1(50,20); A point2; A point3(40,30); cout<<"End Main\n"; return 0; }

Member Avatar for rubberman
0
160
Member Avatar for Ana_4

Create a program that calculates and displays the average price stored in the file. Display the average with a dollar sign and two decimal places.

Member Avatar for rubberman
-3
70
Member Avatar for Asira18

Hi guys am writing a program for a restuarnt and its about their menu. am in need of corrections,ideas and anything that will make the program excellent thanks..below is the code. #include <cstdlib> #include <iostream> #include <cstring> using namespace std; int main(int argc, char *argv[]) { int num1,num2,num3,num4,num5,num6; cout<< "WELCOME …

Member Avatar for Asira18
0
228
Member Avatar for tgreiner

I am reading a data set where each data line contains a value that I want to read over and then ignore. So, I create three variables as: int number1, number3; float number2; and read them in. I use the data in number1 and number3, but never use number2 (other …

Member Avatar for rubberman
0
4K
Member Avatar for My_1

I know the following sound a homework problem but it not it a study guild I to study but i am stuck. I really need help. I dont want to fail the test tomorrow The following C code defines Fibonacci function int fib (int n) { if (n == 0) …

Member Avatar for My_1
0
341
Member Avatar for ramonlarodo

What I am trying to do is each thread gets to print out its 5 characters before potentially yielding to another thread. It works but it does not do what I want. THanks for help. for (unsigned i = 0; i < _repCount; ++i) { unique_lock<mutex> lck(mtx); cv.wait(lck, []{return !inUse; …

Member Avatar for Moschops
0
120
Member Avatar for James_44

I can't figure out how to get my functions to work. I have to use void functions but I'm lost. I have to bring data in. An array of numbers. 8 27 33 14 81 146 305 249 412 71 226 4 144 55 97 493 133 265 788 240 …

Member Avatar for tinstaafl
0
209
Member Avatar for hadisur_rahman

#include<iostream> using namespace std; class B { int a; public: int b; void get_ab(); int get_a(); void show_a(); }; class D :public B { int c; public: void mul(); void display(); }; void B::get_ab() { a=5;b=10; } int B::get_a() { return a; } void B::show_a() { cout<<"a="<<a<<"\n"; } void D::mul() …

Member Avatar for Hassan_12
0
252
Member Avatar for m andrew
Member Avatar for Hassan_12
0
250
Member Avatar for Petcheco

Hello, guys. I've wrote the following code #include <iostream> #include <string.h> #include <string> #include <locale> #include <stdio.h> #include <stdlib.h> #include <limits> #include <vector> #include <windows.h> using namespace std; string Numero_de_Matricula = ""; string Nome = ""; int Numero_de_Materias = 0; int Numero_de_Creditos = 0; vector<double> creditos (10); vector<double> Coeficientes(10); double …

Member Avatar for Petcheco
0
134
Member Avatar for Yuki_1

Hi, in my project i need to update the attn_dateTimeOut in database.After i updated it will automatic delete the specific row record that had been updated. I had two question: 1) in my database there are a few table is assign not null."attn_dateTimeOut" is a table that haven insert any …

0
107
Member Avatar for snippo

Develop a Shipping Information System to help the management of the company to manage the shipments for all the customers Implementation: Once the user runs the program, the menu shown below should appear: 1. ADD NEW CUSTOMER. 2. ADD NEW DESTINATION. 3. ADD NEW SHIPMENT. 4. EDIT EXISTING SHIPMENT. 5. …

Member Avatar for rubberman
-2
114
Member Avatar for Petcheco

Hello, guys. I wrote the code to a Quadratic Equations Solver and I'd like for you to run the program and read the source code and give me tips on what I can improve, what is good and what is bad, suggestions, etc. . #include <iostream> #include <locale.h> #include <math.h> …

Member Avatar for Petcheco
0
280
Member Avatar for Rafael_4

**this is what it should look like, a while loop that repeatedly reads goals,assists, stops when a negative is entered. at the end it calcuates sum, average. donot know how to calcuate sum or average if i dont know how many times the user will enter.** Enter a number of …

Member Avatar for DavidB
-1
242
Member Avatar for nikki_2

can you pls help me for this , " write a program that will accept 3 row and 1 column integer number compare the value of x,y,z.

Member Avatar for Schol-R-LEA
0
132
Member Avatar for Learner010

Yesterday i completed my exercises on loop , that's why today i've decided to create a tutorial on loop in c++. # Loop # loop allows us to repeat a statement or a group of statements. When we want to repeat a single statement then it is not necessary to …

Member Avatar for Markland
7
711
Member Avatar for Abdul_32

#include <iostream> using namespace std; float read_input() { float x[5],a, b ,c, d ,e ; cout<<"enter 5 numbers:"<<endl; for (int i=0; i<5; i++) { cin>>x[i]; } a=x[0]; b=x[1]; c=x[2]; d=x[3]; e=x[4]; cout<<"a="<<a<<endl; cout<<"b="<<b<<endl; cout<<"c="<<c<<endl; cout<<"d="<<d<<endl; cout<<"e="<<e<<endl; } float calculate_average() { int total=0 ,avg; { total += float read_input( a,b , …

Member Avatar for deceptikon
0
2K
Member Avatar for vjkmr

a + b - c * d If the types of a, b, c, and d are int, long int, float, and double respectively, then the type of the expression is:

Member Avatar for deceptikon
0
94
Member Avatar for negru

How to access each element of array of words? For example, if I want to find number of vowels in every word of an array. #include<stdio.h> #include<stdlib.h> int main() { int i,n; char **array; do { printf("n=");scanf("%d",&n); } while(n<1); array=(char **)malloc(n * sizeof(char *)); Thanks for replies.

Member Avatar for yoavip
0
94
Member Avatar for it@61@sec

I have generated an image for my VU+ Solo2 after following the instructions on the following URL: http://blog.videgro.net/2013/05/how-to-compile-software-for-vu-plus/. This works OK if I use standard C-code (as in the example in the URL), but when I try to compile C++-code I get errors which seems to originate from using the …

Member Avatar for it@61@sec
0
2K
Member Avatar for tentrabyte

guys i need your help. so this is my strcpy program. i am ask to create a program that will defined function that will do the same strcpy function using pointers only. did i do it right or wrong? please help me #include<iostream> #include<string.h> using namespace std; int main() { …

Member Avatar for Moschops
0
229
Member Avatar for markdean1989

Hi guys! Just needing a little of your help here. I have been looking for a free IDE where I can program in C++ for the past months now after messing up my MSVS 2013 for Desktop. I found Netbeans to be a nice alternative. But I am having some …

Member Avatar for markdean1989
0
203
Member Avatar for PETRICIAMARYMALLIGA A
Member Avatar for adnan_6

Dear programmers, I want to implement English language feature in the following application http://www.codeproject.com/Articles/714651/Desktop-Sharing-using-RDP-APIs-and-Socket . I followed this http://stackoverflow.com/questions/12929934/same-resource-identifier-in-different-language-sections-in-an-rc-file-why-is-it post and https://msdn.microsoft.com/en-us/goglobal/bb688160.aspx Now my peer.rc file code is // // Peer.RC2 - Microsoft Visual C++ 不会直接编辑的资源 // #ifdef string ID IDS_ENUMSTRTEST #error Microsoft Visual C++ #endif //APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // 在此处添加手动编辑的资源... …

Member Avatar for adnan_6
0
317
Member Avatar for AleMonteiro

Good night dani people. I'm current developing a project that needs an web API to list all directories and files, and also provide a method to search by name. I already got it working with Sytem.IO.DirectoryInfo at real time. //Folders foreach (DirectoryInfo info in _dirInfo.GetDirectories()) { } //and files IEnumerable<FileInfo> …

Member Avatar for AleMonteiro
0
229
Member Avatar for hadisur_rahman

plz help me to solve the problem..add some more code in c/c++ related to show that the output will be password too strong or strong or weak.... #include <iostream> #include <cstring> #include <cctype> using namespace std; bool testPass(char []);//function prototype to check password int main() { char *password; int length; …

Member Avatar for ShiftLeft
-1
443
Member Avatar for DS9596

Need help to fix errors, I know int a[] should be specified but not sure how to. #include <iostream> using namespace std; class TWO { private: int age[5]; public: //read data into array void ReadData(int age[], int n); //member to return the average of data in array age of object …

Member Avatar for rubberman
0
169
Member Avatar for phony

` //Header file: stackADT.h #ifndef H_StackADT #define H_StackADT //************************************************************* // Author: D.S. Malik // // This class specifies the basic operations on a stack. //************************************************************* template <class Type> class stackADT { public: virtual void initializeStack() = 0; //Method to initialize the stack to an empty state. //Postcondition: Stack is empty. …

Member Avatar for tinstaafl
0
959

The End.