293 Posted Topics
Re: Did you try to do it? Or do you just want us to do your homework? | |
Re: *c->something(); is the same as (*c.)something(); it tells to evaluate the pointer part first just like 2+2*2 us different from (2+2)*2. You can use () instead of -> but -> looks better | |
Re: Try to make another small application which contains the code that doesn't work. I don't feel like going there 600+ lines of code | |
Re: Please use code tags for code, and what are the errors you get? | |
Re: Apache Server + PHP + MySQL database. Perfect combination! | |
I started learning assembly today and I copied and pasted a program that displays hello world. I tried to modify it to use C function system("PAUSE") and I made this: [CODE][section .data] hello: db 'Hello, world!',10,0 pause: db 'PAUSE',10,0 [section .text] global _main extern _printf extern _system _main: push hello … | |
In Dos there was this file you can change that would change your starting directory when you start your computer. So I wonder is there such a file in Windows, because I am learning assembly programming and I want all my files to be in 1 place. Right now my … | |
This is when I try to output uninitialized characters on the screen. I thought C++ should declare all of them to 0's (or '\0' for characters) when I declare them without initializing? | |
Re: No, C is not used anymore much expect in OS development. C# is foor n00bs and c++ is used for most of the big programs, games, and other things right now. Most of the internet browsers are made it C, and most of the video games. And whoever said that … | |
Re: All my family believe in god except me "Life is easier if you believe in God" -quote No it's not! You have to constantly worry about getting into hell. "So do you guys think religion is just a big scam?" -quote Yes, it is just a big scam started by … | |
Re: I am not a Linux programmer but I think Sleep(time); function is everywhere. And this should also work if there is not Sleep(); [CODE] include <time.h> void sleep(clock_t wait) { clock_t goal; goal = wait + clock(); while( goal > clock() ) ; } [/CODE] | |
I have several questions regarding OS programming. 1 - How do they write Operating systems? 2 - Do you know what compilers is used to do that (or library)? 3 - Do they have to burn it to a CD and reboot the computer every time they test it? 4 … | |
Are there any good books on x64 assembly. I am using 64 bit Windows 7, and Quad Core AMD. I tried to find some books but they were all for 32 bit system. Does it even matter or will it work on my computer too? So is there any good … | |
| |
Re: I am not sure how to do it but I will try to make it myself as Ancient Dragon said and then post the code here. I got a lot of free time :p. And this is all for a good cause :) | |
Re: Doesn't matter. I usually first declare a prototype and then function underneath main but it is so it will be easier to scroll through main. And the best way is to make an additional file for other functions that are not in main. You will have to include the header … | |
I am making a game bot which does certain function for a certain ammount of time. I want to give the user an option to shutdown when it all ends. What functions are out there to do that? Can I do it with <windows.h>? | |
Re: I once made something like that. Command prompt? Make a loop and then every second move update the screen and wait for input. | |
Re: This functions sets cursor position to a praticular spot on the screen. Include <windows.h> and for example to move cursor to line 2, 10 letter write gotoxy(2,10). You dont have to worry about the code inside the function. Fore example if you want to make a countdown timer without writing … | |
Re: I have AMD Quad core and it works perfectly, never overheats amd is pretty cheap. | |
Re: There is DIFFERENT compilers but standard C should work everywhere but you will have to recompile it. For example <iostream> library can be used anywhere but <windows.h> is OS specific. But for example Assembler is different everywhere and It is really not portible. Java on the other hand can run … | |
I am making a program which includes comaring 2 numbers (int's) but later I want to call another windows function and it takes in CHAR not int. I need a way to convert my ints to char. I looked up this on internet and non if it worked. Do you … | |
I know I may not be ready for this but I want to make a client side application that will talk to a server and be able to inspect element. I know some Windows APIs and C++ but I am not sure how to log in the web-site with the … | |
Hello, I am making a program where you are entering 2 numbers which should be product AND sum of other 2 numbers. The program then outputs what are the other 2 numbers. For example if I enter sum 13 and product 22 the program will output 2 and 11. But … | |
Re: You can use some windows functions with command prompt. It will not be GUI but still windows. | |
C:\Users\Kostya\Desktop\c++\MacroWriter\ifexists.cpp|27|error: ambiguous overload for 'operator=' in '((farm*)this)->farm::sendeachbase[i] = 0'| Ok so I am making a class for my program and I want to initialize some of its variables to 0's. I haven't done anything with classes for a while so I am not good with this stuff. This is my … | |
Re: Can you post the code for the whole program, not just little parts of it. | |
Re: If you want a to equal a times 7 then write a = a*7. not just a*7 | |
Re: You write [CODE]cout <<op1[i];[/CODE] And I agree with jonsca, post your code here | |
Re: There is a bunch of stuff wrong with this code. First is that you DON'T write the functions return type in main. Here you wrote a declaration of the function (or whatever its called :p) Also you need to define functions before main OR write what you did in main … | |
Re: I know you already made the program but I just wrote a completely new one because I was bored. [CODE]#include <iostream> using namespace std; int main() { int number; cout << "enter number: "; cin >> number; int i = 0; char xs[number]; while(i<number) { xs[i] = 'x'; i++; } … | |
I am trying to allow user to input something while there is time so I took a function sleep() that I found somewhere and changed it for input. Well, it doesn't work. [CODE] char sleep(clock_t wait) { char c; clock_t goal; goal = wait + clock(); while(goal > clock()) { … | |
Re: Try something like [CODE] ifstream input; input.open ("data.txt", fstream::in | fstream::out | fstream::app); int i = 0; int a[numberofwords]; while(!input.eof()) { input >> variables[i]; i++; } input.close(); }[/CODE] | |
Once I was trying to create an object inside a switch statement. It looked something like this. [CODE] cout >> "Enter how many objects you want to create: "; int nofobjects; cin << nofobjects; switch(numberofobjects) { case 1: objectclass object1; break; case 2: objectclass object1; objectclass object2; break; case 3: … | |
Re: I tried to fix it but you have some wierd "highlight" with a wrong cout operator. | |
Re: That sounds like your homework. Does someone have a link to a post to not ask for homework here? | |
I don't understand why goto's are so bad. I LOVE to use it in an if-else or switch to quit a loop. But everyone says they are bad and I should not use them but no one says why! Can you explain it to me? | |
Re: You forgot to include #include <cstdio> #include <cstdlib> | |
Re: Why don't you declare your variables inside main? | |
Re: > I am VERY novice and working on a school project in C++. I'm not sure where I've gone wrong here in this code. Any advice on why this is not working would be appreciated. Please, pretend like you are talking to someone who knows very little about programming so … |
The End.