417 Posted Topics
Re: i ran into an issue such as this a while back and ended up just writing a library to handle all SQL connections so that all forms had a central method for running their methods. | |
Re: It can be tricky, there is a playSound function in C++ but it's not all that powerful so you may be best suited to look for a library to do that, or feel free to get your hands dirty with some DirectX. :) [url]http://msdn2.microsoft.com/en-us/library/ms712879.aspx[/url] | |
Re: your code worked and compiled fine for me (besides a typo in your post) what exactly are you referring to as not working? [code=cplusplus]cout<<toupper(*pos)<<" "; //without cast it doesn't work, why?[/code] while it does work the output from it may not be what you are expecting. the output from toupper … | |
Re: I've learned that what i actually write for clients and what I learned in class and books is pretty darn far apart and for the most part the instructor has become too far seperated from reality to give good advice. You get a lot of "The book says..." | |
Re: Make sure to test if the stream is open inFile.is_open() if it's not open your vowels.txt file is in the wrong directory. that being said if you want I can PM you a working version, a little simpler, but i will wait till you struggle through a bit more before … | |
Re: hehe, i just wrote a counter that will go all the way up to 10001 instantly, though i havnt tested it for higher values. super simple and absolutely NO goto's. [code="cplusplus"] #include <iostream> #include <math.h> int main( void ) { // count to the 10001'st prime int primeCount = 2; … | |
Re: The interface is far to cluttered to use efficiently especially when browsing search results. I had to close the page as soon as my results came back because it was far to much work for my eyes to find anything of real value. | |
Since i am going to have to learn Smalltalk well enough to convert it to .NET ( or so i have been told ) i decided to convert some of the C++ tutorials to Smalltalk. Namely this one: Write a program which performs addition, subtraction, multiplication of matrices. The dimensions … | |
how many of you out there use and what about it do you find usefull or to be a headache. I will be using it on a new system i was just picked up to support, the primary interface will be written in .NET languages but i will need to … | |
Re: pick up the C# pocket reference, cant go wrong with a book that leaves out the filler and gives you what's important. :) | |
Re: not sure about the update thing, but in your or die statment you should change it to [php]or die(mysql_error());[/php] that way you can tell what the error might be that your recieving. also i dont see a problem with sending various mysql query's its a good way to keep things … | |
Re: can i get the EXACT error messages that pop up, every bit of detail is nessicary!! in the mean time, if you dont mind reupdating your computer (granted you are on Windows XP and i see you are from your descritpion) you can try SFC /SCANNOW (go to run and … | |
Re: [quote=dev.cplusplus;415627]Hi to all I hope you can help with the following issue I have, thanks in advance. I'm working in an application that insert text to pictures. The problem is that after inserting the text, the size of the new pictures is smaller(in KB). I'll explain myself the original picture … | |
Re: [URL]http://www.daniweb.com/forums/thread82074.html[/URL] posted just a few below this. as well as some good examples linked i believe. | |
Re: he probably left off his method declaration [code="csharp"] private void LoadScenario( string[,] Vars ) { } //but if you only need one portion of the string in vars private void LoadScenario(string Vars) {} //then call like this.. //assume we are inside of a class at this point LoadScenario(vars[x,y]); //where x … | |
Re: yes it can be a bit of a pain at first but using the windows api it can be done :) this is of course in windows, you need to specify the OS for a more specific answer. [URL]http://msdn2.microsoft.com/en-us/library/ms632587.aspx[/URL] | |
Re: java compilers and the java runtime environment are created using C++ learning both C and C++ is good but you may find yourself trying to unteach yourself things from C when you work in C++. | |
Re: [quote=jbennet;407587]Okay here is some code I have made: [code] /*============================================= Number Guessing Game Uses the srand() function and loops. James Duncan Bennet - james.bennet1@ntlworld.com ===========================================*/ #include <iostream> #include <cstdlib> #include <ctime> #include <fstream> #include <string> using namespace std; int guess = 0; int tries = 0; string line; int main() … | |
Re: working on my setup here [code="cplusplus"]#include <iostream> #include <map> #include <string> using namespace std; class x { char str [40]; public: x () {strcpy (str,"");} x (char *s) {strcpy (str,s);} char *get(){return str;} }; bool operator< (x a, x b) { return strcmp (a.get(),b.get())<0; } class y { char str … | |
Re: [quote=Phrogramer;374055][B]Say I have some software and I have it all finished and everything[/B], how do I go about getting it into shops? How do I go in a and talk to them? I don't mean shops like PC World (yet anyway) I mean my local PC shop. How do I … | |
Re: [QUOTE=darkscript;400613]The idea here is to make each character in the string exist in every position, for example: string is "JOY" so taking J:- 1st pass: "JOY" 2nd pass: "OJY" 3rd pass: "OYJ" taking O:- 1st pass: "OJY" 2nd pass: "JOY" 3rd pass: "JYO" taking Y:- 1st pass: "YOJ" 2nd pass: … | |
Re: because i happen to think you are one of the brighter minds i have met in a while i will take you up on your challenges. i will post back shortly with some code :-D | |
Re: since you are using VC++ i am assuming you arein the .NET framework? do you happen to be working with windows forms? System::Windows::Forms if so then you can capture keyboard input very easy on any form. | |
Re: post your code please :) | |
started a new thread because naru got my interest. please explain. [code="cplusplus"] #include "stdafx.h" #include <iostream> #include <string> #include <cstdlib> using namespace std; void reverseword(char * reverse) { size_t size = strlen(reverse); //get the size of the char * for(size_t i = 1; i <= size; i++) { cout << … | |
Re: you dont need C++ to do this. in fact running a shutdown on mass ammounts computers is better suited for a NT script. you could just as easily write a bat file [code]shutdown -r -f -m \\192.168.1.104 -t 60[/code] just open notepad, save as .bat and run it. | |
Re: so lets say you have an array of names and you want to itterate through all of the names and each letter in the name [code="cplusplus"] string allnames[20]; //lets say we have 20 names for(int i = 0; i < 20; ++i) { //get the length of the names int … ![]() | |
Re: [URL]http://www.cplusplus.com/[/URL] great resource, i use it for the most part. | |
Re: not to be rude but your models/environments dont show much but the same item composed of simple primitives copied over and over again. not enough variation in your work. | |
Re: try doing a reinterpret cast reinterpret_cast<new data type> (expression to convert) or you may have some data wrong | |
Re: [URL]http://www.connectionstrings.com/?carrier=pervasive[/URL] you are still going to need to go to pervasives website and download the appropriate driver to use and furthermore you should configure/test the driver. | |
Re: vectors are much like arrays [code="cplusplus"] #include <vector> int main() { //standard way to create an array int myarray[someconstsize] = { 0 }; //assigns all values to default zero //vector declaration vector<int> myvec;//declares an int type vector //adding data to them myarray[0] = 4; myvec.push_back(4); //adds four to the end … | |
| |
Re: [QUOTE=shadrakni]i just signup to ask you to show me the basic and advance script for creating a online game startup bot[/QUOTE] though i personally dont know how to do this, you are going to need to give alot more info. like what game is it, how do you connect to … | |
Re: easy!! this is more of a command shell question though :-/ seperate each command with the & symbol use a && to ensure that the following command is only run if the previous was successful so to go up a directory and get the contents [code="cplusplus"] system("cd .. && DIR"); … | |
Re: post your current code for the entire file that is throwing the errors. please wrap using [ code="csharp" ] [ /code ] tags. | |
Re: [quote=ace5798;401378]PLEASE HELP.... I was wondering if someone could help me. I am taking a programming class and I am having alot of problems. When I began my class we were given a copy of Visual Studio 2003. I had alot of problems with it and when I would go to … | |
Re: you need to check to see which item has been selected so when the event is raised do a check to make sure that the selected item is the right one. | |
Re: to get a random within a range [code="c"] int min = 33; int max = 127; int range = (max - min) + 1; //now generate some random numbers int somerandomnum = min + (int)(range * rand() / (RAND_MAX + 1.0)); //method will always generate a random number within range … | |
Re: FIXED! [code="cplusplus"] //get the length of a string using the sexually transmitted library #include <iostream> #include <cstdlib> using namespace std; int main() { string foo = "mystring"; cout << foo.length(); } [/code] EDIT: because i only have so long to edit i may have to double post to get some … | |
Re: also the logic is wrong in your code, with your current example only removes the character in the third position it does not remove every third character. something like this creates close to what you are asking [code="cplusplus"] // string_manip.cpp : Defines the entry point for the console application. // … | |
Re: [quote=pixrix;398868]what he mean is using C++ language n code.. what is the dif.. how can i change it[/quote] from what i understand C++ is a subset of C so all C code should compile in a C++ compiler. without going through your code line by line i guess it would … | |
Re: use this [code="cplusplus"] cout << (*itr++).c_str() << endl; [/code] | |
Re: i will check it but also you should try running it a few times to see what happens. EDIT: also please include any headers and other functions you may have defined :) | |
Re: fastest method [code="csharp"] string splitme = "foo,bar,feet,meet,meat,skeet"; ArrayList gatherSplit = new ArrayList(splitme.Split(new char[] { ',' })); [/code] | |
Re: [quote=hinduengg;396044]Thank you so much for the SUPERB explanation . Now I would try out a program that implements insertion sort and see to it whether I am successful . Loads of thanks once again. :)[/quote] now it's time to write your own insertion method :D no better way to learn … | |
Re: try naming your functions relevant to what they do. i will go through this now and see what i can do to help you though :) | |
Re: My guess is you could maybe use it for understanding the process/concepts but i doubt you could get much more than that. PHP has much language syntax that mimics C++ but i doubt i could use PHP as an entry into C++ :) | |
Re: go to the MSDN website and look up the function you will find everything you need. |
The End.