293 Posted Topics

Member Avatar for xnutcracker
Member Avatar for xnutcracker
0
194
Member Avatar for JohnBoyMan

*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

Member Avatar for WaltP
0
86
Member Avatar for CodyOebel

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

Member Avatar for CodyOebel
0
279
Member Avatar for cestra
Member Avatar for zambag
Member Avatar for sergent

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 …

Member Avatar for sergent
0
692
Member Avatar for sergent

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 …

Member Avatar for sergent
0
149
Member Avatar for sergent

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?

Member Avatar for NathanOliver
0
113
Member Avatar for sha11e

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 …

Member Avatar for sergent
0
213
Member Avatar for mrnutty

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 …

Member Avatar for crunchie
0
871
Member Avatar for pritpal.singh88

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]

Member Avatar for sergent
0
940
Member Avatar for sergent

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 …

Member Avatar for sergent
0
175
Member Avatar for sergent

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 …

Member Avatar for GunnerInc
0
140
Member Avatar for Hyiero
Member Avatar for KazenoZ

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 :)

Member Avatar for sergent
0
194
Member Avatar for resell4

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 …

Member Avatar for sergent
0
90
Member Avatar for sergent

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>?

Member Avatar for sergent
0
80
Member Avatar for afnan92

I once made something like that. Command prompt? Make a loop and then every second move update the screen and wait for input.

Member Avatar for WaltP
0
84
Member Avatar for jingda
Member Avatar for sha11e

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 …

Member Avatar for sergent
0
9K
Member Avatar for exception

I have AMD Quad core and it works perfectly, never overheats amd is pretty cheap.

Member Avatar for hitman47
0
441
Member Avatar for lochnessmonster

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 …

Member Avatar for JasonHippy
0
497
Member Avatar for sergent

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 …

Member Avatar for mrnutty
0
210
Member Avatar for cretaros
Member Avatar for sergent

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 …

Member Avatar for sergent
0
144
Member Avatar for sergent

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 …

Member Avatar for sergent
0
126
Member Avatar for geekme
Member Avatar for TailsTheFox

You can use some windows functions with command prompt. It will not be GUI but still windows.

Member Avatar for rubberman
0
106
Member Avatar for sergent

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 …

Member Avatar for mrnutty
0
255
Member Avatar for mark103

Can you post the code for the whole program, not just little parts of it.

Member Avatar for sergent
0
255
Member Avatar for Lokril
Member Avatar for Lokril
0
117
Member Avatar for magravis

You write [CODE]cout <<op1[i];[/CODE] And I agree with jonsca, post your code here

Member Avatar for magravis
0
110
Member Avatar for gladtoplay5

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 …

Member Avatar for gladtoplay5
0
281
Member Avatar for Tenjou

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++; } …

Member Avatar for sergent
0
2K
Member Avatar for sergent

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()) { …

Member Avatar for sergent
0
2K
Member Avatar for magravis

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]

Member Avatar for magravis
0
116
Member Avatar for sergent

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: …

Member Avatar for WhiZTiM
0
193
Member Avatar for smitty34
Member Avatar for sergent
0
135
Member Avatar for DaniwebOS

That sounds like your homework. Does someone have a link to a post to not ask for homework here?

Member Avatar for sergent
0
105
Member Avatar for sergent

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?

Member Avatar for arkoenig
0
547
Member Avatar for jmcginny5
Member Avatar for zaneulhaq
0
100
Member Avatar for thisischris
Member Avatar for fiberoptik147

> 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 …

Member Avatar for sergent
0
209

The End.