49,761 Topics

Member Avatar for
Member Avatar for timbomo

i want this code to do the action, which is generate a random number 1-6. i am totally lost here ive been looking at examples and this is what i have. i get the error function def is not allow here before "{" token. [CODE]void roll_hold( char remark) { if(remark=='r') …

Member Avatar for Fbody
0
295
Member Avatar for tennis

in c++ primer " [CODE]void reset(int *ip) { *ip = 0; ip = 0; }[/CODE] After a call to reset, the argument is unchanged but the object to which the argument points will be 0:" I understand that the argument is unchanged, but why the object to which the argument …

Member Avatar for Fbody
0
104
Member Avatar for roshantha08

I wrote following code. It's compile properly. when i enter 2 characters in to textbox at run time, it gives an error. Error is : "String must be exactly one character long." this is the program, I wote: [CODE]#pragma endregion private: System::Void btnSend_Click(System::Object^ sender, System::EventArgs^ e) { char caEntry[10]; String …

Member Avatar for jonsca
0
137
Member Avatar for buzzykerbox

Hey gang, I have a string array containing 10 words,I would like to randomly pick one of these words, how do I go about it,cant find any tutorials???? Thanks Buzz

Member Avatar for mrnutty
0
87
Member Avatar for Stefano Mtangoo

Hi guys, I need help with and Idea on how to do this. Basically I want to have sockets session. User logs in and the program authenticates him against DB. Having done some PHP this is not big problem. The problem is how do I maintain session. In PHP there …

Member Avatar for Stefano Mtangoo
0
71
Member Avatar for alhafes

Hi every body I have some question about log file . What is the log file ? What is the importance of the log file? List 4 example of system where the log file should used and briefly exaplain why? Should the log file be monitored in the real time …

Member Avatar for kunal kislay
0
74
Member Avatar for tinudeshmukh

hi... i need to automate my system.... for which i need to run a c++ program from a php function.. how cani do this plz help...!

Member Avatar for saiprem
0
61
Member Avatar for mani_singh

hello all, I am reading a book on c++. It talks about pointers and how to use them. I dont understand what the point of pointers is. Mainly, why would someone need them and what can a programmer do with them. Please be as detailed as possible as i am …

Member Avatar for kunal kislay
0
155
Member Avatar for mahdi68

Hi i download fdm source code from source forge , now i want to compile and run it on visual stedio 2008 but this errors shown : [CODE]Error 4 error C2666: 'fsString::operator ==' : 3 overloads have similar conversions c:\users\mahdi\documents\downloads\compressed\fdm_3.0.848_source\fdm\include.add\fsstring.h 101 FDM Error 5 error C2666: 'fsString::operator !=' : 3 …

0
91
Member Avatar for slicer

Hi I really need help figuring this one out I have been working at it forever. I am trying to pass an array of 3 pointers, which are themselves arrays, and get the sum of the last two pointers and store it in the first pointer. The pointerarrays are filled …

Member Avatar for Excizted
0
113
Member Avatar for tinkeydo

The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 5 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character …

Member Avatar for tinkeydo
0
281
Member Avatar for jasneg16

what code can I use to make a fortune cookie program that will give a random result when you input bday, month and year? I'm new with this but this is what i typed first: [CODE]#include<conio.h> #include<stdio.h> main() { int dd,yy,mm; clrscr(); printf("Know your Fortune Cookie reading"); printf("input birth day") …

Member Avatar for jasneg16
0
80
Member Avatar for Pelle_3

Why do I have do use the Seekg()-function two times in a row to make it work? Code: [CODE] fbin.seekg(0); //jump to record at start of file fbin.seekg(0); //jump to record a second time (else it won't work) fbin.read(name, sizeof(name)); //read from data field 1 fbin.read(reinterpret_cast<char*>(&age), sizeof(int)); //read from data …

Member Avatar for Pelle_3
0
196
Member Avatar for timbomo

can someone tell me what i am doing wrong #include<iostream> using namespace std; [CODE]void char play_again(char letter, char 'y', char 'n'); [/CODE] [CODE]void char play_again( char letter, char 'y', char 'n') { char 'y', 'n'; char letter ; cout << " Would you like to play agian?( press y or …

Member Avatar for Nick Evan
0
158
Member Avatar for timbomo

i got errors and i cant find out what they meant i have went down the program line by line trying to figure them out and i am having no success. I am trying to use call by call values and parametrers n this program. (list of errors are below) …

Member Avatar for mattjbond
0
348
Member Avatar for timbomo

error: default argument for `int&ns1' has type `int'. i cant figure out why this error is popping up it says the error is on line 3, anyone know how to help? [CODE]#include<iostream> using namespace std; void score_num(int &ns1=0,int &ns2=2,int &ns3=3, int &ns4=4, int &ns5=5, int &n6=6, char gam_answ); void display_score(int …

Member Avatar for mattjbond
0
187
Member Avatar for timbomo

i am having a problem getting a random number 1-6 on an invisible dice and storing the number. i get this error |error: at this point in file| for this code: [CODE]void roll_hold( char answer, int turn) { if(answer=='r') { do { (rand(turn)% (char& ns1=0,char& ns2=2,char& ns3=3, char& ns4=4, char& …

Member Avatar for WaltP
0
89
Member Avatar for rcard53762

I am a part time college student getting his butt kicked in C++. I dont know how to access the members of the class in this header file. How do I do it? And please use plain english. Thanks // Specification file for the Complex class // constructor included. #ifndef …

Member Avatar for jonsca
0
120
Member Avatar for TheZea

Hello all, Firstly let me say yes, i have searched the forums, secondly No! i am not asking for you to do my homework, i realize how much you all hate that =P I am here for some guidance, i have exhausted my researching capabilities and am at the point …

Member Avatar for TheZea
1
453
Member Avatar for rahulrulez

Hey guys, I want to know how can we write the usernames and passwords in file just one time and later on they can be used for log in purpose.. I've some 5 objects of 1 class which can call the class only when the Username and password is correct. …

Member Avatar for thomas_naveen
0
55
Member Avatar for PinoyDev

Good day guys. Im just new in c++. I just want a little help/guide/sample code or steps on how to get files from a certain txt files(notepad) and display it on screen. Vice Versa. Thank you for giving time. God bless.

Member Avatar for PinoyDev
0
130
Member Avatar for mrnobody

I'm trying to figure out how to change the edit box colour when I click on the button. Btw, i'm using VC++ 6.0 (MFC). One way I can do is assign a colour variable. When I click the button, the colour variable changes. When the program call the OnDraw function, …

Member Avatar for mrnobody
0
2K
Member Avatar for rockstar8577

I was wondering if anyone knew of a good library to use for making gui's in c++. You should know that i know of winprog but the problem is that its c. I don't want c because i haven't learned c. I would like to use something that you code …

Member Avatar for rockstar8577
0
187
Member Avatar for gorgey506

[CODE]//A Fight #include <iostream> #include <cstdlib> #include <ctime> #include <string> using namespace std; using std::cout; using std::endl; using std::cin; using std::string; int main() { char again = 'y'; while (again == 'y') string yourweapon; cout << "Enter weapon: "; [B][U] cin >> yourweapon;[/U][/B] string yourname; cout << "Enter first name: …

Member Avatar for gorgey506
0
161
Member Avatar for Saabrina

So I've got a major issue in my program. I'm working on building something in OpenGL (using glut), the problem is that I changed my TexureLoader from being just a function, that takes the storagevariable as reference and the name, to a class, which just takes the name (and got …

Member Avatar for Saabrina
0
122
Member Avatar for El3et

Hi I'm trying to play a WAV file. I have used the following code... [CODE] PlaySound("C\Sounds\GAME_OVER.WAV",NULL,SND_ASYNCH); [/CODE] I get the following [CODE] Error 7 error C2065: 'SND_ASYNCH' : undeclared identifier c:\Users\Chris\Desktop\Pacman\v1.0\Pacman\Pacman.cpp 65[/CODE] I have also tried... [CODE] PlaySound (TEX("\\SOUNDS\\GAME_OVER.WAV"), NULL, SND_SYNC | SND_NODEFAULT); [/CODE] With this i get no sound …

Member Avatar for helsing1989
0
144
Member Avatar for kmaxat

Hello Everybody! first of all,i`m complete noob at software developing.I don`t even know what language i should write the program that i need.Basically, i want to create program that has sort of "sand box" environment for windows. The purpose of the program is to make the human who currently logged …

Member Avatar for kmaxat
0
97
Member Avatar for msnina

how can i manipulate some vectors in c/c++ like v1(1,0,0,0) becomes v2(0,1,0,0)

-2
25
Member Avatar for somaja

for many times when i debuge defferent programs i found this error. I think no error in my code because when i degun the same program in ma freids computer no wrong happen. Any idea. the errors: 1- fatal error LNK1120: 1 unresolved external. 2- error LNK2019: unresolved external symbol …

Member Avatar for somaja
0
208
Member Avatar for Afupi

My goal in this program is to solve for the 12 unique solutions for the 8 queens problem. All the below posted is my code. I believe that my findSolutions function is capable of finding the first solution but I have a couple issues from that point. If the user …

Member Avatar for Afupi
0
533

The End.