I live in Greece and study Informatics at the Technological Educational Institute of Athens.
- Interests
- Music, Web Design, Design, Movies
45 Posted Topics
![]() | Re: Hi, although I'm not sure this is the correct place for your post, try using 'make' command |
Re: Try making the op variable of type [I]char[/I]. You will also want to begin your do{...}while loop a little bit earlier before the [COLOR="green"]cin >> op[/COLOR] command hits. | |
Re: You can do that by using CSS. Supposind you want to change the background colour of class [b]MenuOption[/b] object: [CODE] .MenuOption:[COLOR="green"]hover[/COLOR] { background-color: grey; } [/CODE] | |
[INDENT][B]Hello, everyone[/B][/INDENT], nice to feel so welcomed here! My name is John and I study Informatics in Athens, Greece. I'm using the nickname mikrosfoititis which could be translated as "young student". I'm into C++, C, HTML, CSS, and basics of MIPS Assembly, PHP and JAVA. I would really love to … | |
Re: Well, what kind of expectations do you have in building a game? How do you imagine it is going to look like; Because if you're planning to build some 3D first person shooter with awesome graphics rather than a simple tic-tac-toe board, then you're gonna need a lot more than … | |
Re: what about just [ICODE]int A[a][b][/ICODE]? | |
Re: Make variables [COLOR="Green"][I]sc1[/I][/COLOR], [COLOR="green"][I]sc2[/I][/COLOR], and [COLOR="green"][I]sc3[/I][/COLOR] of type char, as you want the user to enter a signle character in them. | |
Re: By the way it is moving diagonially because you set the move in accordance to [icode]i[/icode]. Each time the variable is increased in the for loop, your "character" is moving both at x and y directions. | |
Re: We won't reach an understanding until you at least tell us what it is supposed to do. | |
Re: Well they are kind of obvious... Let's start from the bottom: [list] [*] [CODE] void delete_list() { nodo* point = ult; while (point!=NULL) { nodo* p; p=point; point=p->ant; ult=point->ant; delete p; } [/CODE] You're missing a semicolon here. [*] [CODE] nodo search_nodo (int n) { // ----- Função procura nodo … | |
Re: Tried to follow, but lost it somewhere near... [CODE]input[count] += inputtotal[count];[/CODE] Would you like to insert some comments telling us what you expect each of these statements to do? Then we will be more likely able to help you. | |
Re: Just use getline() when you read strings from the user. Remove [ICODE]cin>>newptr->title[/ICODE] and [ICODE]cin>>newptr->author[/ICODE] from your code. | |
Re: Why not use [ICODE]e^((ln(x))/2)[/ICODE]? That's the formula they use to find square roots (x is the number to be calculated and e is the know constant). | |
Re: What about using [ICODE]unsigned int[/ICODE]? | |
Re: You have to decide, is it e[COLOR="Red"]gd[/COLOR]e or e[COLOR="red"]dg[/COLOR]e the name of your struct? | |
Re: First of all you need to get rid of the while loops in your if and else if statement: [CODE] if (( random_temp >= 12 || random_temp < 17 )) { [COLOR="red"]while( random_temp >= 12 || random_temp < 17 ) {[/COLOR] cout << " Temperature below 17 Degrees Celsius " … | |
Re: Your i variable you use in your for loops should not exceed 9: [CODE] for(int i = 1; i < 10; i++) // Not i <= 10 ! // ... [/CODE] [CODE] cout<<"\n\nContent of array 1 : \n"; cout<<array1<<endl; [/CODE] This won't work. Print each value seperately instead, using again … | |
Re: The order that the compiler compiles your headers and sources is defined in a "makefile". You need to either create one on your own either create a project using a modern IDE and import these files in it, then compile. | |
Re: [QUOTE=subith86;1710337]Hi all, [CODE] char *temp = "poiuytrewq"; [/CODE] [/QUOTE] You need to occupy memory before you do the initialisation: [CODE] char *temp = new char(255); temp = "poiuytrewq"; [/CODE] | |
Re: Yes, as seen above in the menu() function, he/she uses: [CODE] cin >> level; [/CODE] Use cin.ignore(), as Schoil-R-LEA suggested, after that statement. | |
Re: You can create a loop using the argc argument. Supposing you want to start from argument #1: [CODE] for (int i = 0; i<=argc; i++) { //Your code goes here } [/CODE] | |
Re: Where's the problem here, your objects seem to be sorted appropriately to me. | |
Re: You could also use a do {...} while() loop to have the user enter new answers each time instead of repeating the same code over and over. :) | |
Re: You are trying to print a character as a string: [CODE] printf("your quote was : %s",ch); [/CODE] I'm not sure why toupper doesn't work with my IDE but try this: [CODE] printf("your quote was : %s",toupper(line)); [/CODE] | |
Re: Well if it should not be done with a single printf statement, then it should be done using pointers. Supposing you have a "str" variable of type [I]char*[/I] to hold your string here is what you should do: [CODE] str += 3; printf("%s\n",str); [/CODE] | |
Re: Could you please post a copy of the assignment here, so that we can understand what the exact challenge is? | |
![]() | Re: Could you be more specific? ![]() |
Re: Tokens and an appropriate grammar is the best approach for a calculator programm. | |
Re: Look at this part of the code: [CODE] tmp[COLOR="Red"][b]2[/b][/COLOR]=chars[i]; chars[i]=chars[j]; chars[j]=tmp[COLOR="red"][b]1[/b][/COLOR]; [/CODE] You want to use tmp2 instead of tmp1 when assigning a value at chars[j]. EDIT: Oh, I see you found it yourself :P sorry for my late response! | |
Re: Actually for some of you, you can subtract an integer from a character, as characters and integers are just zeros and ones in the computer. So basically a character can be interpreted as an integer with value equal to its ascii code. Now, learner guy, ifyou don't want to use … | |
Re: [QUOTE=itzcarol;1703650]Thank you. I need this program to be in c++ .... I was wondering if people know my errors, because I don't know my errors.. The outcome of my codes is junk numbers.[/QUOTE] [LIST=1] [*]Of course you don't know your errors. In fact you don't seem to have understood a … ![]() | |
Re: As Schoil-R-LEA mentioned above correctly, you need an input file stream to read from a file. ofstream is used for output. Also note that your second while loop will never print anything if your file contains less than 10 lines. The structure of the programm should rather be modified. Y.G. … | |
Re: Try putting two equal signs at your if conditionals: [code]if (binarySearchResult == iERRORNOTFOUND || binarySearchResult == iERROREMPTY)[/code] | |
Hi everyone, I seem to be experiencing some problem with the linking of header files. I'm sort of creating Date structures and I have the following files: [list] [*][b]Date.h[/b]: Class Date declaration [*][b]Date.cpp[/b]: Class Date functions definitions and auxiliary functions [*][b]DateFormat.h: Class DateFormat declaration (used to format Date objects) [*][b]DateFormat.cpp: … | |
Re: [COLOR="Green"][b]weapon.name[/b][/COLOR] doesn't exist. This is weapon.[b]N[/b]ame you're trying to access here (capital 'N'). | |
Re: It is not behaving unexpectedly. When the "inorder(r->left)" is called for the last time with a NULL pointer, it indeed just returns without having executed the loop. Then, the programm just continues to the next statement, which in your case is the printf function. | |
Re: I think you can't initialise Cmax within the class: [code]static const int CMax = 100;[/code] Try this: [list] [*]In your Rinkinys.h file do the following alterations [code] static const int CMax; Preke R[]; [/code] [*] Now add to the top of your Rinkinys.cpp file: [code] const int Riknikys::Cmax = 100; … | |
Re: Can you give a slightly more detailed explanation of what you want to do, please? | |
Re: lol! These all probably come from "Wiz.h" file that's included in the code | |
Re: Hey, does this website looks like dani's-aids-to-retards-and-flubby-brained-brats-whose-highest-goal-is-way-long-overcome-by-the-friendly-neighbour's-little-dog to you? | |
Re: Well, in your second file (if the code is really ordered like this), you have declared your SquareClass at the end of the file, after the main function, which causes the "undeclared identifiers" errors. The compiler reads the file from the top to the bottom, so don't expect it to … | |
Re: Although your code needs a lot of improvement a simple way to work around this is to end the cNewArray string with the escaped zero character: [code] ... ... ... int endPos = 0; for ( int i = 0; i < 10; i++ ) { int j = PosSwitch … | |
Re: Instead of using goto, wrap the whole part you want to loop within a [b] do {...} while [/b] statement. | |
Re: [QUOTE=hemj;1700001]Can someone please tell me why I am getting an error message saying 'temps' is uninitialised??? [CODE]#include <iostream> #include <string> #include <fstream> #include <sstream> #include <cmath> #include <iomanip> #include <cmath> #include <cstdlib> using namespace std; struct record { string websiteUrl; double revenue; int hits; }; struct totals { double totalRevenue; … |
The End.