- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
72 Posted Topics
I've spent hours, an embarrasing number of HOURS on how to read a text file into a program. The requirements have shifted, but still. I hate you C. You and all your pointers. The text file is a matrix, but with the first line being the number of rows. See … | |
Re: I am in the exact same position as the original poster. I am currently enrolled in two pre-requisite courses (for the C.S. master's) at a local state school. CPAtoCompSci, have you taken any steps towards the computer science certificate/schooling? Right now I am taking calculas and an entry level programming … | |
Hi Everyone, I am trying to get the program below to work correctly. The line below is where I'm having trouble. (line 33 in PrefixCalc.java) calc = new ExpressionTree(new Scanner(console.nextLine())); When I run the program and enter "4 + 8", the scanner only picks up "4". Apparently this program was … | |
I am trying to get the program below to work. I keep getting the error below, and I can't figure out why??? Derived.obj : error LNK2001: unresolved external symbol "public: virtual class Other * __thiscall Derived::add(int,int)" (?add@Derived@@UAEPAVOther@@HH@Z) #ifndef _BASE_H_ #define _BASE_H_ #include "Other.h" class Base{ public: virtual Other *add(int x, … | |
Hello, I am working on an assignment. I am given the code below. I am trying to figure out what the line directly below is doing. Is this a functor? I am getting a compiler error saying the compiler expects a ';' before the '*'. I've searched for functor examples, … | |
I would like thoughts/advice on the project I am working on. I am trying to build a program that simulates the score of a baseball game given individual player statistics. As of right now, the program only has one team batting for nine innings. I am a computer science student … | |
Hello all, I am 28 years old and have about 4 years experience as an accountant. I am currently enrolled at a local university taking two intro computer science courses. I am curious as to what opportunities might be available given my accounting background. According to my academic advisor I … | |
I know .NET is a Microsoft framework. I currently use Visual Studio 2008 for C++ programming in school. Am I using .NET? What is .NET? More specifically, is C++ a .NET framework by default? Does it just relate to the class libraries? | |
Hello, I know nothing about web development or ASP.NET. I started a tutorial tonight that consisted of cutting and pasting code into the editor. Now I am getting an error with the code I have cut and pasted. Does anyone know what is wrong with calling the RenderBody() on line … | |
I am beginning a master's degree in computer science this coming fall. I have been reading about "big data". Does anyone work or study in this field? I know it is relatively new, but I am curious as to how one would get involved. | |
Is this a real class? I am working through a Deitel book, and they use it, but my program does not recognize it. I am importing the same libraries as the example in the book. | |
Hello, I am trying to work through an example from a Deitel book. I keep getting a "source not found" error on line 27 of the LabelFrame class. I have put the "bug1.png" in every single directory associated with this project. I am stumped... [CODE] import java.awt.FlowLayout; import javax.swing.JFrame; import … | |
Just wondering if it is worth taking the time to learn the GUI packages, or do most developers use GUI designers? I am guessing the GUI designers are more often used by hobbyist, while the professional developers write the code? | |
Hello, I am working through an SQL Server 2008 book. I am to the query section. I have copied the query below, word for word (I believe), but the system is showing a problem at line 10. This is the first query I have tried to create. I don't see … | |
Hello, My roommate and I are both connected to the same wireless router. We have both tested our download speeds at websites such as speedtest.net and speakeasy.com. For some reason, he is getting 13+ Mbps, while I am downloading 1-2 Mbps. I am running AVG free edition and have the … | |
I am relatively new to programming. Today I met with a headhunter. Without asking the question, this person told me that java was where it's at. I was surprised to hear this. I know java is widely used, but it seems like there are plenty of opportunities with C++ and … | |
I set a reminder in my phone for this date. Remember the "January 3rd" glitch? Hopefully it has been fixed. Either way, tonight I will be using a backup alarm. [url]http://blogs.computerworld.com/17592/iphone_alarm_clock_glitch_still_not_working_ios_bug_fail[/url] | |
Re: How do you make it a non-member function? By putting before public and private? | |
Homework Question: [CODE]For a direct-mapped cache design with 32-bit address, the following bits of the address are used to access the cache. Tag: 31-10 Index: 9-4 Offset: 3-0 What is the cache line size (in words)?[/CODE] Answer is: [CODE]The cache line size = 2^byte offset bits = 2^4 = 16 … | |
Not sure I understand what is going on with setw(). [CODE] I would expect the program below to output something like this 77 77 77 77 Instead, it does this: 77 77 77 77 77 77[/CODE] Why are the first three 77's not indented? [CODE]#include "utility.h" // setw example #include … | |
Hello, I am currently working towards a computer science degree. I am interested in both software engineering and database administration, but I am not sure which I will prefer as a career. I am considering working on an Oracle certificate, just to get my feet wet, and see how well … | |
Hello everyone, Like the headline says, my computer goes crazy when I run this program. The problem did not occur until I added lines 80-83. When the program is run, my computer starts beeping and weird characters show up on the console. Any thoughts on the problem and why it … | |
Help! Why am I getting the following error on line 100?? I don't get an error when I use storage in other places? error C2065: 'storage' : undeclared identifier [CODE]#include "utility.h" struct masterFile // master file record { int employeeID; string employeeName; string departmentID; int YTDhoursRegular; int YTDhoursOvertime; double regularPayRate; … | |
Is it possible to have multiple input streams open at the same time? I know it takes a lot of time to open a file, and I am trying to be as efficient as possible. I really need to have two streams open at the same time. The data is … | |
Hello, I am working on the following problem [CODE]You are asked to optimize a cache design for the given references. There are three direct-mapped cache designs possible, all witha total of eight words of data: C1 has one-word blocks, C2 has two-word blocks, and C3 has four-word blocks. In terms … | |
Problem: Find a mathematical derivation for the exact number of assignments and comparisons for the worst case insertion sort scenario. I know the worst case scenario is the list being in reverse sorted order. My best guess from looking through these is: Step one being (2+(n-1)*(n-1)) Step two being (2+(n-2)*(n-2)) … | |
Hello all, I have a text file set up as follows. 1 1 1 2 2 2 The program below is not reading the first line. The code below will only read 2 2 2. What am I missing here? main.cpp [CODE]#include <iostream> #include <limits> #include <cmath> #include <cstdlib> #include … | |
Hello, I am getting the following error from line 108. I'm trying to find information on the error. The elapsed_time function returns a double, so I'm not sure where there is a problem. error C3867: 'Timer::elapsed_time': function call missing argument list; use '&Timer::elapsed_time' to create a pointer to member [CODE]#include … | |
Not sure if anyone is familiar with column sort. I have this very close to working, but there are a few instances where the numbers are out of order. They occur at the beginning of each new column. I am looking for bugs in my transpose(), reverse_transpose(), shift(), and reverse_shift() … | |
Hey everybody, I am still pretty new to programming. I am not getting a compiler error here, but I can't figure out what the problem is. I get the message "an unhandled win32 exception occured [1576]" It seems like some type of overflow in the insertion_sort function. I am still … | |
Hello, I am trying to add integers to a two dimensional vector. My problem is on line 26. I know this is how you would add the data to an array, but how do you do this for a vector? Also, is it true you cannot pass an array to … | |
Re: Did your instructor say what your hash function should do? | |
This is a lot of code, but most can be ignored. I am just having a problem with using templates/types. main.cpp(48) : error C2664: 'HashTable<Entry>::insert' : cannot convert parameter 1 from 'int' to 'int &' There is basically a type mismatch between line 48 of main (int) and the HashTable::insert … | |
Hello all, I have created an array of linked lists called hash_array[]. I am trying to write a search function. I am getting compiler errors on line 7 & 9. They are below. Line 7 warning C4018: '<' : signed/unsigned mismatch Line 9 error C2784: 'bool std::operator ==(const std::list<_Ty,_Ax> &,const … | |
Hello all, I am trying to write the constructor for the HashTable class, so it will create an array when a HashTable object is created. With the code below, I am getting the errors: error C2466: cannot allocate an array of constant size 0 error C2133: 'arrayTest' : unknown size … | |
Hello all, Lots of code here, but much of it can be ignored. I am getting an error on line 34 of HashTable.h, stemming from line 50 of main.cpp. I am trying to create an array of lists in the HashTable.h file. Error code is: \HashTable.h(34) : error C2440: '=' … | |
I'm trying to determine if this creates an array of pointers, with the array size being "size"? Is this correct? [CODE] int size = x; int *ptr; ptr = new int [size]; [/CODE] | |
Hello, I need to take a four digit integer and re-arrange it as follows... pre: 1234 post: 3412 I have been searching for a method to convert a char array to an int, so I can use the code below. Am I using atoi() incorrectly? The result I get when … | |
Hello All, I just want to see if you have the correct answer for a homework problem. The question is to find the smallest number of entries that, when inserted in an appropriate order, will force a B-tree of order 5 to have 3 levels. I believe the answer is … | |
Re: I changed the cin line (line 15). You were also missing a } . It compiles now, but there is more work to do. You will get a runtime error when you try to run because you have not initialized the numStudents variable. [CODE]#include <iostream> #include <string> using namespace std; … | |
Hello All, Not sure this is the right forum, but I have a Visual Studio question. I am used to using code::blocks as an IDE. My current instructor likes to use Visual Studio 2008, so I am trying to adjust. One big difference I have found is that when a … | |
![]() | Re: I would start with [CODE] int main() { code more code } [/CODE] LOL... Can you read the input in as a string and separate the digits for the calculation? ![]() |
Re: These are my favorite of all time. [url]http://www.amazon.com/Sony-MDR-J10-Headphones-Non-Slip-Design/dp/B000092YR6/ref=sr_1_1?ie=UTF8&qid=1319081782&sr=8-1[/url] | |
Re: I find that you get more responses when you use the code blocks. Also try to indent your code. [CODE]#define TRUE 1 #define FALSE 0 int search2Darray(int x) { int i, j; for (i =0; i< 2; i++) for (j=0; j < 10; j++) if (a[i] [j] == x) return … | |
Re: Same as your last post. You declared a function that uses variables that are declared after the function. | |
Hello, I am working on a binary search tree program. In main, line 21, I am invoking the Binary_tree insert function. I get a compiler error on line 178 of the Binary_tree file. The error says "error: cannot convert 'const int*' to 'Binary_node<int>*' in assignment. They both seem like ints … | |
Hello, I am getting the following error on line 96, and also for every function implementation below line 96. What do I need to add? error: expected unqualified-id before 'void' [CODE] //Binary_tree class interface template <class Entry> class Binary_tree { public: Binary_tree(){} //constructor //Post: An empty binary tree has been … | |
The End.