- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
80 Posted Topics
Re: I believe the integer length is holding the place of the vowel. I don't remember exactly how strtok works or what exactly does it return, but using it you will get the length of the word before the vowel for all of the vowels by using the while loop. So … | |
Re: well I'm using sfml atm to build a game similar to golden axe, and my friends are building a similar game to diablo which is a bit simpler since its an over view kind of a game(still looks better than diablo 1 and maybe even 2 ;) ). it takes … | |
(netbeans latest, windows 7) So, from what I understood, once I start a servlet program the html page with a form in it loads and I can debug the program only when I click the Submit button at the end of the form. if the form is doPost then by … | |
Re: Here's an example of your mistake: Coordinate Coordinate::operator+(const Coordinate&) { return Coordinate(x + a.x , y + a.y, z + a.z); } Should be: ( **notice the "a" and the const** ) Coordinate Coordinate::operator+(const Coordinate & a)const { return Coordinate(x + a.x , y + a.y, z + a.z); } … | |
Hi, I'm having a problem with the stop() and play() functions The first frame function works fine during the first run of the program but as i hit space in the last frame ( go back to frame 0 ) the first frame function saying whether to stop or play … | |
Re: Make a more generic game. Instead of built in levels , use a class ( or just a function if you dont know classes yet) that will read from a file. Even better is to build another class that will randomly make the levels it will recieve the difficulty and … | |
Hi , just started programming in MATLAB and I have a question. Image files can be written as RGB/GRAYSCALE/INDEXED and more types, from what I saw in MATLAB you can read an image by using `imread()` function the only difference is what it returns. [img,MAP] or img how do I … | |
Re: Such a hero waiting for full 7 minutes. Please teach me how to be so patient . You know, I thought that if `char *` points somewhere it points to 1 byte and an `int *` points to 4 bytes, so I guess `Cout << ` is going to be … | |
Re: So you can do it by num(mod1) and as long as it's not 0 multiply by 10? Good luck on that ! | |
Re: Think of it this way: You have a base class named Button, that has a Virtual void Action() method. And lets they you have 3 derived classes: Enter, Space, Numpad, that are being held in a Button ButtonArr[3]. Each of the buttons has its own action. void Enter::Action(){ cout<< "Enter\n"; … | |
Re: First option : Use global variables. That way, you can approach them from anywhere in the code. Second option : Call the display function with the number of arguments you want it to return and then use the "new" allocation of an array - The return value of the function … | |
Re: Post your first code it should'nt be too different so according to your code a help will be given :) | |
Re: Don't have much time but if I am not mistaken template functions must be in the header. Try moving the the whole function from the CPP file to the H file. (if you still want seperate files try renaming the CPP to TPP) good luck | |
Re: I guess you dont understand what a SET is? you could use arrays to hold more than one value, and by your experience I guess that's enough. and you need to use functions to change the sets values. good luck | |
Re: 1) You should take a look at the Operators option in the C++ language. That way you can just write the FRACTION3=FRACTION1+FRACTION2; and not FRACTION3=FRACTION1.ADD(FRACTION2); just an advice. 2) Take a look at "THIS" , that way you can modify the class you are in instead of sending it as … | |
Re: What seems to be the problem officer? Compilation? Linking? Logic? Thanks. | |
Re: http://www.cplusplus.com/doc/tutorial/structures/ and notice the "Repeat" at the bottom, **W** hic **H** means you- w **I** l **L**- ne **E** d some kind of a loop | |
Re: First dont forget to close it `myfile.close()` if im not mistaken. and then as np complete said using the remove function posted in the msg | |
Re: Add a boolean variable in the beginning of the program. `bool found=false;` ( or if you don't use booleans just use an int with 0 or 1 like your X variable) inside the while loop keep the strcmpi but like this `if(!strcmpi(yr,new_yr))` and change the boolean value to true and … | |
Re: If you perform the command `char c=83` you will get that c is equal to 'S' edit: sorry didnt see the wstring :O only works on char | |
Re: I would suggest the try catch method. just inserting all those function calls into one TRY statement and each could throw a different warning class to be caught on the outside that way instead of running all the function you could stop after the first error. but that depends on … | |
Re: Won't getch() do the trick? something like his while loop with getch as the first command everytime? or am i missing something? char charArray[50] int k=0 while(k<50) ---charArray[k]=getch() ---k++ | |
Re: Database class with Add function . Think i'd choose a map structure. and a person class to hold all the information needed. AND THATS IT you are done ! good luck | |
Re: rubber how is rebuilding the tree could be any better than just deleting the node? i thought deleting it in a non balanced tree would cost O(N) and from a balanced (RB tree for instance) would cost O(logN) whilst building a new tree is atleast NlogN or did i missunderstodd … | |
Re: Hey Walt, by saying C can pass a reference using a different syntax ,do you mean Pointers? just wanna make sure I didn't miss anything while studying ;) func(&val) and prototype : void func(T *val) | |
hey, i need suggestions of programs to ease the access to usb devices like webcam in a c++ program im writing. this post is made because i already tried a few suggestions like videoocx and videocapX but unfortunately they arent compatible with windows 7 64 bit , or just cant … | |
Re: Post your hard work, I'll give you a hand finding the problem. but am I wrong to assume you have nothing to post? | |
Re: take another look of the if statement it only takes one command and whatever was declared in it is destroyed and gone, cant be approached from the outside of the scope. if you want all 3 commands to be performed together just add {} and if you want only the … | |
Re: DFS wont give u the shortest path because if node #1 connected to #end node it is one step but the DFS might go first to #2 ->#3-> ..... ->#end and this is the only path you will find try the BFS method , its easy to code . just … | |
Re: Not sure if it's just because I just woke up, but a few questions: 1. What is arr2 for? 2. Do you think the inner loop should really go all the way to the end? *i* don't :P maybe you could leave the inner loop out. make a boolean `boolArray[SIZE=60]` … | |
I was thinking about somehow using a static member that all the matrix cells will be defined by their value + the static value. but than i thought how can i do it? what is the easiest way of doing so without the need to run over the 10^6 cells? … | |
Hey I just tried using the OpenCV for the past few hours but I keep on failing. I am a Windows 7 user with Visual Studio 2008. I followed the instructions for OpenCV2.2 (whilst downloading the newest stable version 2.4) did the CMAKE phase exactly the way it says . … | |
lets say I make a shortcut to a file that exists ln -s ex7 ex7_shortcut now I have a C program that checks and finds that ex7_shortcut is a symbolic link and changes it be placed at "currFolder/links/" ("currFolder/links/ex7_shortcut") 1) how (if possible) can i fix the symbolic link to … | |
been trying to google it for a while now but didnt help using the " "... anyway i need to do a recursive search inside a sub tree of the file system. given a folder A , I need to go through all of its sub folders. so far the … | |
Hi just had an assignment to make a nice looking html5/css website this is what i got so far https://dl.dropbox.com/u/67006557/EX2/home.html got any suggestions on stuff i can add to make it better? and also if anything is wrong with the html logic / css commands etc. tired of getting bad … | |
![]() | Re: can u post the latest code I can go through it with ya ![]() |
Re: so you actually want the longest path? idea - make each "price" -1 ? | |
Re: since the fields are protected you are able to change them in the derived classes, so not sure if I understand what you mean. anyway i think your inheritance tree should look abit different . first have a controller that will manage the game ( event handler display handler , … | |
I made a new project that has to open a folder using DIR * `DIR * directory=openDir(...); // openDir is a function returning DIR * after it was opened` than to make a new folder in it, so far so good `mkdir(path,permissions);` and now i have to run through the … | |
Re: well there are a missing `ClosedHash::` before some of your functions try fixing that up , should clear a few errors ... ClosedHash::insert(....) {...} report back with your new errors good luck ^^ | |
Re: #include <ctype.h> #include<conio.h> have you added all of the includes he mentioned? | |
Re: for this you will could use a few methods. try reading about the following - function prototypes and implementation - math operands in c++( ill help you with this one) [Click Here](http://cpp-tutorial.cpp4u.com/basics_operations.html) - and the difference between INT / DOUBLE / etc once done think of a nice way to … | |
Re: well as for the "mathametical" question: if you have 5 rows it shows in c++ as 0-1-2-3-4 so you need to get the '2' row which can be done by just dividing by 2 (5 / 2 =2 - if you are using integers) another example if there are 3 … | |
Re: i think you could use a std::map<std::string,std::string> _q; and you can insert any question as a key and the answer as the value http://www.cplusplus.com/reference/stl/map/ if i understood your needs... good luck :) | |
Re: what you can do is to seperate the program into functions. . . . int main(){ func(); other(); dothis(); } void func(){ //do your stuff } void other(){ //do your stuff } void dothis(){ //do your stuff } incase you dont know what functions are i suggest you skip to … | |
Re: O( n ) right waltP? just checking ;) arushi when you show us some work we'll help you with the best answer there is, and you will learn stuff - AWESOMEEEEEEEE | |
I have read a file with around 120k words so i try to do it fast. have seen the: int x = setvbuf(fp, (char *)NULL, _IOFBF, BSZ); assert( x == 0 && fp != NULL ); option but it takes more than a second ( 1 mb file) so now … |
The End.