49,760 Topics

Member Avatar for
Member Avatar for daino

Would anyone know how to put user input into a Char Array. I've provided the code below It doesn't work so I've tried many variations like making char wrd as char wrd[20] but still nothing. I think I'm missing a fundamental point here. All I want to do is have …

Member Avatar for deceptikon
0
43K
Member Avatar for Andrew_39

Hello i been doing some program of my own, my program is to get the number of days paased in the year. I am having hard to get get the passed in the year. Now when i try to run and the output gives me "4438232", i am really having …

Member Avatar for Johan_1
0
7K
Member Avatar for Rodrigo_5

Develop a C++ program that finds the minimum of 4 even numbers entered by the user.? The program should display the following grades if the minimum value is found within the given interval; 60-100 A 40-59 B 30-39 C Below 30 Fail

Member Avatar for tinstaafl
0
311
Member Avatar for a_8

Write a program in c++ that ask the user to type 10 integers of an array and an integer value X, the program must put the value X in the index 0, shifting each element right and dropping of the last element. The program must write the array before and …

Member Avatar for rproffitt
0
72
Member Avatar for hegindra

#include <iostream> #include <stdlib.h> #include <unistd.h> #include <time.h> using namespace std; int createZombie() { if (rand() % 67 < 10) return 11; else return rand() % 10 + 1; } int main() { srand(time(NULL)); char enter; // game starts int playerAlive = true; int playerSkill = 9; int playerScore = …

Member Avatar for JamesCherrill
0
575
Member Avatar for Gamal_3

can anyone help me with this assignment, Please. __________________________________________________ The brightness of a binary star varies as follows. At time t = 0 days its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is then determined by the formula 3.355-ln(1.352+cos(PI(t-0.9)/0.7)) Until t …

Member Avatar for Gamal_3
0
318
Member Avatar for Dick_2

Hello, So I am trying to read a text file into an array, but I am having issues breaking it up properly. Here is my text file: 0 Car Fixed 1 Brake 2 Windshield 3 Tires 4 Engine 5 Doors 6 Transmission and here is my code: #include <iostream> #include …

Member Avatar for Dick_2
0
2K
Member Avatar for noname_5

Hi there, I am stuck with a problem, and don't know where to start. I need to calculate the closest pair of points on the Earth using a divide and conquer method. I know I should calculate the orthodromic distance (or in other words the great-circle distance) but I don't …

Member Avatar for AssertNull
0
931
Member Avatar for MRehanQadri

Suppose I'm running a loop and the loop should continue unless I get a garbage value. So what will be the terminal condition. How can garbage value be checked in if condition?

Member Avatar for Reverend Jim
0
4K
Member Avatar for Latrell_vie

I have the following code and i dont understand why P4(3,7)is giving returnvalue true (1) , since here 7(ConTemp.XYCoord[1]) is bigger than 5 (ReCoordRo.XYCoord[1]), so i would like to know a way to monitor the boolean Rechteck1.contains(P4), watch windows doesnt give me that option, so how do i go about …

Member Avatar for ddanbe
0
682
Member Avatar for tom_22

This is the result after applying trained svm..i don't know why i got support vectors as 0's and why i got uncompressed support vectors. Can someone help me? <?xml version="1.0"?> -<opencv_storage> -<opencv_ml_svm> <format>3</format> <svmType>C_SVC</svmType> -<kernel> <type>LINEAR</type> </kernel> <C>1.</C> -<term_criteria> <epsilon>9.9999999999999995e-07</epsilon> <iterations>1000</iterations> </term_criteria> <var_count>8</var_count> <class_count>2</class_count> -<class_labels type_id="opencv-matrix"> <rows>2</rows> <cols>1</cols> <dt>i</dt> <data> …

Member Avatar for rproffitt
0
656
Member Avatar for yuriy_1

Write a C++ program that reads in from a file that contains full names of employees of ABC Company. The file is formatted in the following way: John Jacob Schmidt Jane Marry Roe … The program should take each name from the file into a string and display each part …

Member Avatar for tinstaafl
0
528
Member Avatar for Sherwin_4

Below is my code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; ///////////////////////////////////////////////////////////////////////// /* // struct Edge // Represent one edge in the graph. Fields contain // two vertex numbers and a weight. */ struct Edge { int vertex_1, vertex_2, weight; }; //////////////////////////////////////////////////////////////////////// /* // struct Graph …

Member Avatar for Seif_2
0
378
Member Avatar for Peetah

I am writing a program that reads a comma-delimited file. There are several words on each line that will each be assigned to a string variable, each line in the file is a record, and the file contains several records. I am using getline with a delimiter, e.g. [B]getline(inputstream, string, …

Member Avatar for Adam_37
0
15K
Member Avatar for tnd2491

for (UINT wCount = 0; wCount < pMan->aAccounts.wNumItems; wCount++) { CUserAccount *pAccount = (CUserAccount *)pMan->aAccounts.aItems.GetAt(wCount); if (pAccount->csProfileName.Compare(pGroup->csProfileName) == 0 || pAccount->csSingleActive.Compare(pGroup->csName) == 0) { if (pAccount->_csUserGroup.CompareNoCase(_T("GrpAdmin")) != 0 && pAccount->_csUserGroup.CompareNoCase(_T("GrpOffice")) != 0) { pAccount->pFuncRestrictions->SetRestriction(Area1, Activity1); pAccount->pFuncRestrictions->SetRestriction(Area2, Activity2); pAccount->pFuncRestrictions->SetRestriction(Area3, Activity3); pAccount->CreateInDatabase(pConnec); } } } Here, my code is calling CreateInDatabase twice …

Member Avatar for tinstaafl
0
322
Member Avatar for Brittany_2

Warning: I am brand new to programing. I am trying to create a random letter generator game for a class project. I feel like I have a good start to it but I am having difficulty with a few points. The program is supposed to ask the player how many …

Member Avatar for Nutster
0
1K
Member Avatar for programmingnoob

im having a problem controlling a stepper motor using a microcontroller..what i did is that i test it with my board coz it has led's to check whether its working or not..we are tasked to make a program in c++ that would make a variable reluctance stepper motor work. If …

Member Avatar for rproffitt
0
3K
Member Avatar for can-mohan

Hi, Below command will give the cpu and memory usage of process in terms of percentage. can we achieve same usin c/c++ API. ps -C <process name> -o %cpu,%mem | tail -n 2

Member Avatar for can-mohan
0
4K
Member Avatar for Ama_1

// This program uses a switch-case statement to assign a //letter grade (A, B, C, D, or F) to a number test score. #include<iostream> using namespace std; int main() { char grade; int testScore = 10; cout << "Enter your test score and I will tell you\n"; cout << "the …

Member Avatar for AssertNull
0
451
Member Avatar for krishna_25

I have a save function like noraml tool (Ctrl +S). I have a command line argument that is defined as (-A). I have to use this -A to perform the save function automatically. If I pass the command in Linux for eg: " ToolName -A ". It has to save …

Member Avatar for rproffitt
0
145
Member Avatar for tom_22

I want to use euclidean distance to match the predicted support vector with the tested support vector. I need to set a distance threshold and calculate the distance between predicted label and tested label. If the calculated distance <= distance threshold, then it will be a match, else a non-match. …

Member Avatar for rubberman
0
72
Member Avatar for jan1024188

Most common quiestion is: [quote]Is there any C++ GUI API?[/quote] My answer is MANY. There are many API's for making GUI applications. Here are some. [B] 1. WinAPI: (C based)(MFC is C++ based)[/B] [I]Its a great API and the best solution if you are windows programmer. First code will look …

Member Avatar for sreenivasula
1
110K
Member Avatar for krishna_25

I already have a save function in my tool as like a normal tools. Now I would like to add auto save function , that has to save all the operation that made in the tool(we called that overlays). I need to write an auotsave function and I have to …

0
213
Member Avatar for can-mohan

I am looking for log archival utility or approach which should be able to help me in based on below policy. (1) whenever log file (system.log) size >30859 or file is 3 day old then it should archive the same with new name system.log1 and again start the feeding the …

Member Avatar for JamesCherrill
0
402
Member Avatar for Shereen_1

Write a C++ program that inputs the number of students in a class and the number of tests and the grades of the tests conducted by each student, then it calculates the average of the student and outputs related information as given below. The Average of a student is calculated …

Member Avatar for JamesCherrill
0
324
Member Avatar for Hasenali

Amazon is Hiring! A job at Amazon is unlike any other you have had. You will be inspired, you will be challenged, and you will impact the future of the technology. This is for some very unique technical projects for Amazon technical development teams (eCSG & Retail systems) in Canada …

0
128
Member Avatar for Sherwin_4

Good afternoon, I have to create a program to only be used as a tool (no main function). Below is the background information related to task: Your goal for this assignment is to create a tool that manages an equivalence relation that can be changed by the program. The equivalence …

Member Avatar for Sherwin_4
0
2K
Member Avatar for Usman_9

the compiler compile the code,but traversing output is wrong .please chech ny logic is correct,tell me best tutorial to learn of binary tree using stack . void usman:: inorder() { stack<node*>s; node *t=root; while(!s.empty()||t!=NULL) { if(t!=NULL) { s.push(t); t=t->left; } else { t=s.top(); s.pop(); cout<<t->data<<","; t=t->right; } } }

Member Avatar for md farhan
0
258
Member Avatar for cwarn23

I've followed a tutorial for making php extensions in C++ and although there are no compilation errors, the extension just won't communicate with php. The tutorial is at [URL="http://www.talkphp.com/vbarticles.php?do=article&articleid=49&title=creating-custom-php-extensions"]http://www.talkphp.com/vbarticles.php?do=article&articleid=49&title=creating-custom-php-extensions[/URL] and my code is as follows: main.cpp [code=c++]#include "stdafx.h" ZEND_FUNCTION(fetch_talkphp_links); zend_function_entry talkphp_ext_functions[] = { ZEND_FE(fetch_talkphp_links, NULL) {NULL, NULL, NULL} }; zend_module_entry …

Member Avatar for Muhammad_137
0
1K
Member Avatar for can-mohan

Hi All, In below code i am getting ouput of process (based on name) memory and cpu utilization % using command "ps -C gnome-terminal -o %cpu,%mem | tail -n +2" .Here gnome-terminal is name of process for that i am printing these values. Now i want to implement the same …

0
149

The End.