- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
42 Posted Topics
I got a snippet off the web of how to download a file from online in c++ console with the curl library. so I installed curl, and copied the code snippet, but it doesnt work. Can someone show me whats wrong? [code]#include <curl/curl.h> #include <cstdio> // link with libcurl. eg. … | |
I'm creating a web app that will use Twitter API's and OAuth so that my app can post to my users twitter accounts. Here is where I'm at so far - I get to the twitter authorization page. Authorize the app to be able to post to my twitter account, … | |
I'm testing out a new program I'm about to make, and created a nice 1280 X 960 BMP image in Photoshop of a field with grass. When I try to load this image into my c++ program running Allegro, the image looks AWFUL. Some of the grass has turned blue, … | |
I'm trying to say this: [CODE] string songLocation = "data/sounds/blabla.wav"; PlaySound(songLocation,NULL,SND_FILENAME|SND_ASYNC);[/CODE] but here is the error I get: [CODE]cannot convert `std::string' to `const CHAR*' for argument `1' to `BOOL PlaySoundA(const CHAR*, void*, DWORD)' [/CODE] Does anyone have any ideas? (btw, songLocation cannot be changed from a string. If that happens … | |
I've got a chunk of code that opens up a txt file with 5 or 6 lines inside. I only need to grab the first line of the txt file and put it inside of a variable. The problem is that when I use this code, instead of grabbing the … | |
I have a script that is using the internet protocol 'Curl' I am sending a http _POST to a php file. To send a post with curl, I need to make a char variable with all my info. for example "name=andrew&country=usa" Here is where the problem comes in - One … | |
I am writing a script that uses curl to grab data from my web server. Unfortunately, thats only a one-way communication. What I would like to do is send a php file some info through curl, then grab the info that php returns. But I am not sure how to … | |
Sorry for the bad title, but I'm not even sure what I'm trying to do is called. I have about 10 lines of code to clear a screen and reprint only certain images back to erase clutter. The thing is, I'm just simply tiered of writing these ten lines over … | |
I've been looking at some tutorials on an easy way to open a c++ thread, but all have different answers and solutions. does anyone have a nice tutorial? | |
I've got a c++ game I'm working on, and I need it to play some music in the background while the user is playing. I looked up how to use PlaySound() and put it in my program. The .wav file loads and plays perfectly, but at the same time, doesn't … | |
Hello. I have a php file with a form on it. the form has a few text fields and a few file fields. The problem is that for some weird reason the file upload fields screw everything up. After I press submit, it carries NO data to the fallowing page. … | |
So you would think that I could search up on Google and learn all about URL encoding from all the tutorials, but I have been left seriously confused, and extremely frustrated. Here is what I need to do: I need to make a html link that links to a php … | |
I'm making a form for admins on my site to submit new videos. the form page has several text boxes (for info like name of video, description, ect.) and a few file upload boxes (for flv video format, mp4 format, ect.) But when it passes to the next page, when … | |
I've got a big problem on my site i'm developing. I have a pretty simple session login script, and every page of my site checks to see if the person is logged in. If not, it redirects them to login.php. I've noticed that when I click links on my menu … | |
I have a nice c++ program going right now, and I want to create a new feature for my users. The problem is, this new feature would cost me money. So what I would like to do is charge users if they decide to use this feature. I would love … | |
I need to create a new txt file using ofstream, but I need to use a string to name the file. For example: [CODE] string string1 = "testfile.txt"; ofstream myfile; myfile.open (string1);[/CODE] but when I try, it says I can do this because string is not a valid variable type … | |
I am trying to say "if variable is NOT greater than or equal to, then do this" Here is how I tried to write it: [CODE]if(mouse_x !>= 300){ blah blah blah }[/CODE] But my complier doesn't like that. Does anyone know what I did wrong? Thanks. | |
Hello. So the most I can tell you is i'm having serious trouble with my code of writing to a txt file. It's not that my code isn't working, it's that c++ is outputting WEIRD crap that makes no logic sense, doing things out of order, and just seriously screwing … | |
I hear that to create a custom icon for your exe file, and must create a .ico icon, then link it to a resource file, which is linked to the main .exe file. I'm not sure how to do this though. I have my icon I want to use for … | |
I am just being introduced into the allegro game library, and I'm making a simple program. My problem is confusing me horribly. I'm using the textout_ex code, but what I want to do is display 2 pieces of info in one textout function. Like: textout_ex(screen, font, "hello" [B][U]AND[/U][/B] MyVariable , … | |
I'm just now learning Allegro, and all the tutorials I have looked at have used a function called textout_ex to print things out to the screen. [B]The problem is -[/B] textout_ex is really starting to p*ss me off horribly because of how specific you must be in the info you … | |
So I have a game in c++ console, and it's pretty big now. (over 3 megabytes) I've been using strings in the code forever, but now, I need to make a separate exe program from scratch that will update the game when needed. Big problem - this new program is … | |
I've got a library that is annoying me. When I command it to do what I need it to do, it spits out a bunch of text onto the screen that I don't need. Is there a way to temporarily "mute" a console program, then re enable it later? This … | |
Long story short, I'm using curl to download a file off my site. I've done tests and successfully downloaded a few txt files. The main point, though, is to download an exe file. So I uploaded the exe file to my site, and downloaded it straight from my browser with … | |
Long story sort, I'm making a thread in c++ that starts a timer. When a user starts playing the game, it starts the thread, and when user logs out - thread stops. - thus giving me the total time played. Problem: When using the code to start the thread - … | |
I have a game that requires me to save alot of info to a txt file. The problem is, I must store all the individual things into separate txt files because I have no idea how to get c++ to read individual lines of a file. For example - I … | |
So I've got a code in VB that will download a txt file from a website. The problem is I want this file to be downloaded into whatever folder that my program is in. for example, if my program was in C:\random_folder\ then I would want this txt file downloaded … | |
Hi. I have a c++ game where you make money throughout the game, and the game saves it to a separate txt file. When the game opens back up, it grabs the info in that txt file and puts it into a variable. Thats not the problem though. I'm adding … | |
I'm trying to make a menu in my c++ console program where a user can hit the up and down arrow keys and this will scroll through the menu options. I got this snippet of code that I could modify to make it do what I want, but its not … | |
I have a game That I would like to release the first version of soon. The game is written in c++, but I would like to add a feature to were before the game starts, it connects to the internet, and downloads a file from my webpage to check to … | |
Hello. For the past 6 months I've been creating a c++ game, but all I have ever learned in c++ is how to write c++ consel. (The DOS screen) Its so ugly and I would really love to turn my game into a c++ API with some basic graphics instead … | |
Hello. I'm developing a game in c++ and have found that you almost have to be Bill Gates to figure out how to connect to the internet using c++. So I've taken the idea that I should create the first section of my game in Java. This section would open … | |
Hi. I am making a c++ console program, and I wanted to add a new feature. but to do this, the guy said i needed a library named curl. Ive only installed 1 library before, but the instructions were VERY straight forward. i have been researching how to install curl … | |
I have a new feature for my c++ console program. its an updater feature. the updater goes online to my website and downloads a txt file, then the updater reads the file, to see if the program is up to date. but theres a problem. the updater is a whole … | |
Im having serious trouble installing a library named curl. ive searched MANY tutorials, but they go over my head, and skip sections of the instructions. Ive never installed a library before, but i need a feature in my script to be able to go online and download a txt file, … | |
im having a bit of trouble with this for loop. can somone show me what im doing wrong? [code]runcount = runcount + 1; cout << "Type a number: \n"; cin >> s; guesssheet[runcount] = s; for(int y = 0; y < runcount; ++y) { if(guesssheet[y] = s) { system("cls"); cout … | |
I have a program in were you enter numbers. each different # set you enter goes into an array ( section[] ) but now what I'm trying to do is add 2 different sections together. [code]for(int x = 0; x < stoppoint; ++x) { track = track + 1; if(section[x] … | |
Im making a program with lots of repeating code, so I decided to take all that repeating code and change it into an array. problem is, I've never worked with arrays before. I tried to look up alot of tutorials, and I understand it more now, but not enough to … | |
I have writen a program that includes ALOT of code. I update this code and work on it everyday, and with so many lines, I get confussed. a big chunk of my code goes like this: [code] cout << "\nNext:\n"; cin >> string2; if (string2 == "end") { cout<< "ok, … | |
i have a code that you enter section after section. when your done, you type end, and it stops asking you to enter in stuff. My problem is, I can get it to detect when I type end. here is my problem: [code] cout << "\n\n\nTo start, enter each section … | |
I am creating a code, and I'm getting this weird error. I'm sure its a stupid mistake, but I can find it. [quote] multiple definition of `Start()' first defined here ld returned 1 exit status C:\Documents and Settings\Andrew\My Documents\projects\equation\Makefile.win [Build Error] [equation.exe] Error 1 [/quote] And here is the code: … | |
I have a c++ console program that alot of people are starting to download. But the program is updated around once a week. problem is, most of the downloaders never check for updates on the site. could add a feature to my program were it would do a check for … |
The End.