48,986 Topics
| |
I am working on a program that reads students name and test score from a file. The program should assign the appropriate letter grade, then output the name score, and grade. It should also determine the highest test score. I do not see where my errors are. Please help! [CODE]// … | |
Hi All, I have a program with threads and after a while i ve got std::out_of_range error. when i broke the process to debug, it pointed me to this line: > testsimulatord.exe!mainCRTStartup() Line 182 C and my stack contents are: KernelBase.dll!7604b727() [Frames below may be incorrect and/or missing, no symbols … | |
Hi. I am writing a program to read user input numbers until '0' is entered. I then figure out if each number is even or odd and find the average of all the evens and all the odds (even average is one number, odd average is another.) I have it … | |
Hello, I've got a simple program where i'm trying to a Char array with a string, but even though the program in debug mode shows that the string Phone = Phone, it is not adding a new line when the string starts with Phone. Can anyone tell me why the … | |
Hello I have a > b(for example) I need to generate random number x that belongs from a to b for example a = 9, b = 16 x has to be x > 9 and x < 16 I use cstdlib.. but can't guess how to do it (using … | |
Ok I got my program running, finally ^.^ Compiling without errors But I want the looping for the binary search to work. How do I get it to loop without sending back a return until all 5 numbers are done searching. [CODE]#include <cstdlib> #include <iostream> #include <fstream> using namespace std; … | |
Hi..I m an engginering student in 3rd yr.I want make a minor software it mns want to do smthing diffrnt.pls give me an advice what should i do for dis.pls help me | |
Hi guys, I'm makeing a Homework "tracker", which is basically a day planner. I need help making a settings file for the initial setup. I have a text box, a couple radio buttons, and one "begin" button. I need a way for the program to remember what choices were seleced. … | |
This is part of my code. I want to declare an array of List, and I want to be able to pass this array to the functions listed below, so that I can do work on the array (i.e. add/delete nodes). But I have problems getting my head around pointers … | |
I have to create the following functions with the code provided: OpenScreen(); MonthlyPayment(???); Amortize(???); AmortizeScreenHeader(???); But I'm kind of confused on whether or not the program will only have functions showing in the main body or will there be more than just the functions? Ex: [CODE]int main { OpenScreen() MonthlyPayment() … | |
I have to answer with the runtime for Big O for a few examples of C++ code. I'm generally having some trouble grasping the concept of Big O but two particular problems are stumping me: [CODE]cin >> x; double n = example(x); for ( i =0; i << n; i++) … | |
i have an assignment can somebody help me, [B] Assignment Statement:[/B] Comparing two arrays for equality or matching indexes You are required to write a program which will take input from user in two integer arrays. The program should compare both arrays for checking if both arrays are totally identical … | |
say i execute an windows api function in my code to allocate memory in the specified process! How do i actually view/know this worked without checking getlasterror() or return codes? is there any other way i can do this in a easier/better manner? maybe runtime with a debugger? if so … | |
Hi again guys, last time I posted a problem I got a lot of help... and here I'm back again with new issue. This is the assignment: [QUOTE] Contains a function called sumN() which takes an int n as an argument and returns an int which is the sum of … | |
I need to calculate the value of sin(sin...(sin(x))) for n times (n and the value of sin are input from the keyboard). That's is what I've came up with. #include "stdafx.h" #include <iostream> #include <math.h> using namespace std; double multipleSin(int n, double x); using namespace std; int _tmain(int argc, _TCHAR* … | |
Hello I'm starting to learn c++ and I'm wondering if I should wait until c++0x standard is published (since I'm not in a hurry, currently learning Perl and Java) or should I start learning c++ with an old book I have If i do learn c++ w/ the 2003 standards … | |
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 … | |
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 … | |
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[ ] … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
[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++) … | |
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, … | |
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 } … | |
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 … | |
Has anyone ever gotten an error saying "the specified file is an unrecognized or unsupported binary format" in regards to starting a library? |
The End.