- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
40 Posted Topics
Hi. I am new to the forum and I had a question. I have looked around and haven't really been able to find exactly what I am looking for. I am looking for the code in C++ to read in a random single line with spaces from a file. This … | |
I am getting this compiler error: gcc -g -Wall -O2 -c -o mybash.o mybash.c mybash.c: In function ‘main’: mybash.c:39: warning: implicit declaration of function ‘getline’ mybash.c:41: error: expected expression before ‘)’ token make: *** [mybash.o] Error 1 It probably has to do with something I don't remember about initializing and … | |
I made a very simple website using ASP.NET and SQL Server. I will post all the code up if it will help. On my local machine, the website works perfectly. I can preview it from Visual Studio fine, and I set up the IIS on my localhost, and it works … | |
I am creating a small website for a little basketball league my friends and I are starting where I can enter the wins and losses for a player and a grid will display all the data for that player. I want the grid to display these fields: First Name, Last … | |
So I have a website, and its pretty simple. I am using my school's hosting to upload files to a server to actually be able to see it online. My school requires our urls to be something like this: oak.cats.uc.edu/~(user_id) I was wondering how I would be able to buy … | |
Hey guys, I am having issues understanding how exactly to mod something to avoid overflow. say i have this hash function: [CODE=c++] int universalHash(const string &x,int B) { long long sum; long long power; sum=0; pow = 1; for (int i=0;i<(signed)x.length();i++) { // cout << "sum= " << sum << … | |
Here is some code that I am trying to use. Why wouldn't this work the way I am assuming it should? here is a sample of vector<string> mine: *** *2* *1* so mine[1][1] = 2. [CODE=C++] // In a function that has passed in vector<string> &mine int dist[2000][100]; cout << … | |
I have a project due in an hour, and I am stuck on it. My project is to write some functions for a maze. ( Live regions, Dead Regions, and if it is possible to exit). The point of the project is to understand graphs and specifically depth first search. … | |
This will probably sound like an ignorant question, but here it is. I am trying to embed a silverlight slideshow control into an html page, and to do so I need an xml config file. Without the xml, the control shows up (it is blank, but it at least shows … | |
Re: Firstly, to get the Test Scores:, Lab Scores:, and Project Scores: to stop printing a duplicate amount of time, you ill have to take them Out of your for loop. The reason you are only getting 2 resuts of scored for each is becuase of the wy you set your … | |
Re: [QUOTE]So say I have a file that has two lines in it, like so: This is one line This is another How would I store line one into one array...like array1={This, is, one, line} and then line two into array2={This, is, another}? [/QUOTE] I would use the getline() function. Loop … | |
Re: I don't think your merge sort is completely done yet. Someone tell me if I am wrong (which is very possible), but doesn't MergeSort work more like this... (keep in mind that this way, you are in fact passing arrays around) [CODE=C++] void Merge_Sort(int array_MSort[], int* temp, int left, int … | |
Hi everyone. I wrote a Rock Paper Scissors program my first quarter of C++ two years ago, and now I have a job at a programming job. I showed someone my little easy program and they challenged me to make a verson 2.0 with AI and a gui. The Gui … | |
Ok so I am looking to read in a bunch of different types of data for a program, but I am having trouble doing so in a very robust way. For strings it's easy. [CODE=C++] string temp; getline(cin, temp); [/CODE] Simple and quite robust. For the rest I am having … | |
Hi all, I am writing a program to make a binary tree. I have all the class/structure part fine, I just want to make the program unbreakable. I am asking the user to input strings, and I am putting those strings into the tree as all lower case (I also … | |
Hello, I have to write a shopping cart class in c++ and I am getting a core dump, and I have no idea why. I know where it is core dumping. Its dumping at 2 places-> Shopping_Cart::Print(Shopping_Cart* head) and Shopping_Cart::TotalPrice(Shopping_Cart* head) Here are my 3 files... shopping.h [CODE=C++] #ifndef SHOPPING_CART_H … | |
I was given the problem to write a class called block cipher to take in a text file and output the same text file after it has been encrypted. I have to use this header file... [CODE]#include <iostream> using namespace std; class block_cipher { public: block_cipher(); // Constructor void finish(); … | |
Hello, I have been stuck on this for awhile, and can not seem to get it to work exactly correct. I am trying to read in a file ("in_text.txt") and print out it's contents to the screen for now (eventually i will manipulate the data with a block_cipher class). Here … | |
I am going to be writing a test script soon, and I will be using vbscript. Can someone give me an example of a test script? | |
I was asked to help make some test scripts at my work, and they use VBScript to write all their code. I pretty much only know c/c++ how hard would it be to learn VBScript if I am decent at c++? And does anyone have preference to which website they … | |
How would I go abou practicing VBScript. I have never used it before. | |
Re: Go to your command prompt and type this ipconfig /all then a list of your connections will come up. Make sure your ip address your mask and gateway match your network settings | |
I know this isnt the right place to ask this qustion, but I figured someone could point me in the right direction of where to ask, because No where else I have found is any help. When I try to run cmd or regedit off my XP run line I … | |
Ok I am wanting to [URL="http://www.daniweb.com/forums/thread81491.html#"]download[/URL] the newest version of the gcc compiler and emacs or gedit to run with PowerShell. I was hoping that someone could give me detailed instructions on how to do so. I am using Windows XP. I believe this is the right place to ask … | |
My work uses Powershell, I was wondering if someone can explain to me how to write c++ with it, if I even can, also what compiler to get for it, and where I can get it. Thanks -kylcrow | |
Hey guys, I need to write a struct that measures the distance from a point (x,y,z) to the origin. I am good on how to write it as a struct, I just don't know the formula for the distance. Can someone help me out? Also, the formula for a dot … | |
I am a freshman in college, and I am a computer science major. I am looking to co-op/intern this summer and fall, and I was wondering what a good entry level job would be, like thier duties and responsibilities. I am posting here becuase I know more about c++ then … | |
How would one right justify a string with a width of 4 and store it in a variable without being able to use cout? If that is even possible. | |
does anyone know what this error actually means? terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr it happened when i wrote this line... string output2 = last + first + scores + string(4, ' ').substr(scores.size()) + " "; | |
Hmm. I am converting a string into an int. [code=c++] string sum(string line) { string first; string last; string scores; string output; istringstream lineStream(line); lineStream >> last; lineStream >> first; for (int i = 0; i < 10; i++) { string getScores = "0 "; lineStream >> getScores; scores += … |
The End.