- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 5
- Downvotes Received
- 4
- Posts with Downvotes
- 3
- Downvoting Members
- 4
Title may be a bit off, but I am having issues trying to form this last function. I created a simple sorting algorithm for a list of ints I have for a project, now the ints are from the min to max. I know the size and have a pointer … |
|
So this is a topic asking for a good explanation if possible rather than code fixes :) So I had this code which originally took two parameters of pointer type and then I changed it to pointer references (or reference pointers?) (tell me which one it is) and it started … |
|
I am supposed to make a binary hash tree mix of code. I know what I am doing for the most part, but its been a while since I have done some serious C++ coding. The compiler is yelling at me because it doesn't like my last definition in my … |
|
Having some problems figuring out how to do this... Basically I have the following right now: [code] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^Age-Of-Empires-Online/([^/]*)$ /index.php?portal=AOEO&$1 [/code] I need to make the old URLs re-direct to the new URL format...but I still want the new URL to ACT like the … |
|
In a few URLs I have on my website, they feed a parameter into the URL that sometimes contains [] in it. I have a preg_replace fixing some links, but the [] breaks my current system. How can i make this work? (I need it in the second half, for … |
|
So I am operating a website using the PHP Invision Power Board system, and it's kind of old. There are 10,000s of lines of code in it that are custom, and re-writing the website is probably more work then its worth at the moment. I want to take the URLs … |
|
So i am a very fluent C++ programmer, and am switching over to PHP/Javascript/MYSQL for some new work that I am doing. I know all the basics of C++ and some of the more advanced STL libraries. I know very basic PHP simply cuz I already know all the arrays, … |
|
Made a small project to help compare two files that I am testing...but for some reason the line I highlighted isn't working as its supposed to. I originally had [CODE]c1 != c2[/CODE] and then changed it to [CODE]!strcmp(c1, c2)[/CODE] Maybe its a dumb logic bug, but would appreciate some help … |
|
Ok, somewhat easy task, but i dont know how to do it. Basically i need to take a currenty written dll file ( which i dont hae the source code for) and i need to copy all of the original content and i need to import some functions from another … |
|
I am disassembling an exe file trying to find out how some parts of it work so we can make an easier modification then the current system works (which is just copy and overwriting files). I found some functions in there that refer to a MPGameSetupPage.cpp (which obv i can't … |
|
I am taking on a new project, this one should be a lot smaller than the previous. I want to take an exe file (a game executable), and change the memory addresses that it reads files from in memory. For instance, when you run the game executable it opens a … |
|
I'm working on a program for fun but I can't figure out my first problem, also I'm aware the program doesn't end. [CODE]#include <iostream> #include <conio.h> #include <string> using namespace std; //all prototypes void studentName(string&); //all global variables //main void main() { do{ string Name; studentName(Name); cout << "\nStudent Name: … |
|
I am interested in learning how to make a simple tic-tac-toe game playable on 2 computers. A small simple project that can help me learn some network coding. I can't seem to pin down a good reference for it. Where is a good place for me to read up on … |
|
I want to read in multiple lines from a file, but I am only able to get my program to read the first line. The program prints out two other lines but the values are zero. [CODE] double cost[3]; int lowerRange[3]; int higherRange[3]; bool active[3]; ifstream inClientFile("ad.txt", ios::in); for (int … |
|
I can not seem to figure out how to drop the lowest score. When I run it it says the lowest score dropped was 0. How do I fix this? [CODE]#include<iostream> #include <string> #include <cmath> using namespace std ; string getName (); int averageScores( int); void printMessage (string, int); void … |
|
I've made a simple webserver in C++ based on this one [URL="http://http://msdn.microsoft.com/en-us/library/ms737593%28v=VS.85%29.aspx"]here[/URL]. And this works fine. Now, my assignment is to pass some info from this server to an html-file that later can be opened in IE or Firefox and then display info like screen resolution. Now.... This is supposed … |
|
Hi im trying to calculate the average of an inputfile using a 2d array. I tried to calculate the average per row and add them all together but my code gives me an average of zero. I was wondering if anyone can see what im doing wrong or a better … |
|
//what is the problem in following program? #include <iostream> #include <cmath> using namespace std; // FUNCTION PROTYPE FOR test_polar void test_polar(); // FUNCTION PROTOTYPE FOR read_point void read_point(double & radius, double & angle); // FUNCTION PROTOTYPE FOR degrees2radians double degrees2radians(double angle); // FUNCTION PROTOTYPE FOR compute_coord void compute_coord(double radius, double … |
|
Hi guys i'm trying to write code that requires the user to hit return twice to terminate the project and I can't figure it out. I think i am supposed to use some variation of [CODE] if(input == " "){ exit(1); } [/CODE] with a Boolean expression but I can't … |
|
I have been looking into an internship through Google, i have a good basic background, but I need more knowledge, I read C++ Primer Plus 5th Edition and got a good background from it. Where can I continue to expand my knowledge? I am trying to nail a phone interview … |
|
I read something online about being able to make my patch run as an administrator by default by using XML code? How would i put this into my program? This patcher is going to be put into a larger source code of a client, and will just be called by … |
|
Hello Daniweb, I'm obviously very new to the programming world. I'm trying to make the popular Guessing random numbers game. The things I'm having a hard time with is getting the input validation to work. When characters are input instead of numbers, the program goes into an infinite loop. I'm … |
|
Hi there, in my binary file i want read something but from 4th byte. i need to read data as 2 bytes int. i have this code but im not sure if its ok: some of my files should have some values less than 0, and im not getting any..so … |
|
I have a pretty solid background on C++. I am interested in possibly expanding to new languages such as Java. I am not interested in reading another 1000 page book on a language when i read that C++ and Java are somewhat compatible. I also read a lot of the … |
|
Ok. So this patch i made has been in beta testing. For some reason my C++ version does not always write the files. but it shows that it patched sucessfully......lists the correct directory where it should be writing the files. They just dont show up. The c# version works though … |
|
I am trying to get a element of string and cast it as a integer. What I am ultimately doing is in a for loop taking an element out of the string and convering that element to an int. This is in order to get the characters ascii value. thanks |
|
Haven't worked with classes for a while, so please excuse all these dumb questions :P Still learning. Let me know if you need more info. 1>c:\users\adam\documents\visual studio 2010\projects\help\pusoy\pusoy\pusoy.cpp(24): error C3867: 'Deck::dealCard': function call missing argument list; use '&Deck::dealCard' to create a pointer to member deck[] is a vector of Card … |
|
I took my deck of Cards (class Card) and shuffled the. But every time i ran the program it gave me the same shuffled results.... [CODE]void Deck::shuffleDeck() { std::random_shuffle(deck.begin(), deck.end()); }[/CODE] |
|
I am trying to take a std::vector<Card> and organize it by one of the int values stored inside the Card class. How could I go about doing this with iterators and the sort() method? Or is it not possible? Ty :) |
|
I am making a simple card game, trying to shuffle a deck of cards that i made with a map. [CODE]std::map<int, std::string> theDeck;[/CODE] How could I go about shuffling the items in the deck? I am having issues figuring out the algorithm. This is what I tried, but didn't work. … |