49,761 Topics

Member Avatar for
Member Avatar for jonymanolo

is posible expalin my for what use %s in a code line [CODE]cmdLine.Format("\"%s\" \"%s\" %d %s %s %s", playerFile, moviePath, 10, cameraName, selectDate, movieID);[/CODE] i need now how works this code line

Member Avatar for tetron
0
87
Member Avatar for vivosmith

[code=C++]#include (iostream.hpp) class Stocks { public: Stocks( int price); ~Stocks(); int get_price() const {return pps;} int set_price() const {pps;} int the_price_is (int pps); int pps; } int main() { Stocks AMX (35) cout << " Hello, please enter a symbol.\n"; if cin>> AMX; cin.ignore; cin.get; AMX.the_price_is cout<<" 35.\n"; return 0; …

Member Avatar for Fbody
0
116
Member Avatar for vbx_wx

can someone help me ,i am trying to enumarate some registry keys,i doesnt get me any error,just the output is wrong: [CODE] void Registry::open_key(HKEY Key , char* subkey) { RegOpenKeyEx(Key , subkey , 0 , KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE , &hkey); } void Registry::querry_info_key() { RegQueryInfoKey(hkey , 0 , 0 , …

Member Avatar for vbx_wx
0
437
Member Avatar for thriek

Hey, im in need of a little help... im trying to have my .exe show an image with sdl, wait 2500 milliseconds, close the image and then return to the black console screen with my cout statments and whatnot appearing. But instead when i exit sdl, the whole program exits. …

Member Avatar for thriek
0
406
Member Avatar for cotinga

i am new in c++ programming language,i do not understand very well imprementation of linked list,can u help me by providing me algorithme for it

Member Avatar for Nick Evan
0
193
Member Avatar for eggberto

I've just read a few books on C++ and learned a lot about the language, but the books never mentioned how to add sound and visuals to my programs. I "think" that stuff is all stored in libraries, but... what tutorial should I read next to learn how to implement …

Member Avatar for WaltP
1
283
Member Avatar for Ali Gohar

i want to make this game....and i need help....in the game computer should play as a second player....and it should also win....is that possible....and is it easy???

Member Avatar for WaltP
0
53
Member Avatar for vasante80

dear sir, i am new to multimedia prog. i am searching for live video streaming c c++. can u help me pls

-1
28
Member Avatar for tallygal

I have to utilize an array for a homework project. I want it to read a line from a file on my hard drive. However, the line starts with words and ends with numbers. I only need to utilize the numbers for a function that I want to pass a …

Member Avatar for WaltP
0
205
Member Avatar for nahmartin

Hello Most of my C++ is self taught so please excuse me In my code I am writing a large amount of data to file [CODE] for(int i=0; i<itr_atoms; i++) file_out << i+1 << " 1 " << atoms[i][0] + origin_x << " " << atoms[i][1] + origin_y << " …

Member Avatar for nahmartin
0
188
Member Avatar for 3cats

I posted last night with this question and I didn't include the coding (DUH). I am getting the error " error C2143: syntax error : missing ';' before '{' 1>c:\documents and settings\user\desktop\c++ programming\midterm2invoice\midterm2invoice\midterm2_invoice.cpp(68) : error C3861: 'While': identifier not found" Here is the code, everything works until it gets to …

Member Avatar for 3cats
-2
149
Member Avatar for satimis

Hi folks, Just join this forum. I, a beginner on C++, have been googling around for tutorial to learn C++ in Linux platform. I found following tutorial; Teach Yourself C++ in 21 Days [url]http://newdata.box.sk/bx/c/[/url] I suppose it is for Windows. Can I use it on Linux? I'll use g++ as …

Member Avatar for satimis
0
124
Member Avatar for vbx_wx

i never used enum before now,but what could be wrong in this definition ? [CODE] enum keys { HKEY_CLASSES_ROOT , HKEY_CURRENT_USER , HKEY_LOCAL_MACHINE , HKEY_USERS , HKEY_CURRENT_CONFIG }; .\src\av.cpp:28: error: expected identifier before '(' token ..\src\av.cpp:28: error: expected `}' before '(' token ..\src\av.cpp:28: error: expected `)' before numeric constant ..\src\av.cpp:29: …

Member Avatar for Banfa
-1
89
Member Avatar for merse

I have an enum type, for example: [CODE]enum signum {negative = -1, positive = 1, zero = 0, inward = -1, outward = 1, indefinite = 2}; [/CODE] I want to use at least one of the following castings: [CODE]signum s = positive; double x,y; x = double(s); y = …

Member Avatar for Narue
0
2K
Member Avatar for kevintse

Hello, everyone. I have a question to ask. According to The C++ Programming Language (3rd. Ed.) by Bjarne Stroustrup on page 405: "Members declared [COLOR="Red"][B]protected[/B][/COLOR]are far more open to abuse than members declared [COLOR="red"][B]private[/B][/COLOR] . In particular, declaring data members protected is usually a design error. Placing significant amounts of …

Member Avatar for kevintse
0
1K
Member Avatar for DarkT

Hi everyone. We were given a homework to code a hash table. The objects and their members were given by our professor and we were only supposed to implement the functions (Add, Remove, Contains and Print), so I shouldn't change the objects. I should also do a copy constructor and …

Member Avatar for DarkT
0
2K
Member Avatar for Naftel23

Hi there, ive been comin here for about a month glancing at forum posts and the practice thread.. I have been self teaching myself C++ for a few months, and it was pretty challenging at first, my biggest problem is memorization.. so anyways... i was wondering if anyone could help …

Member Avatar for Naftel23
0
72
Member Avatar for blind122

I got the first part of my code from my teacher, its how the function should be done, I am just have trouble with what to put for my cin statments as, none of them work. Please help. [CODE]#include <iostream> using namespace std; void reverse(int* a, int n) { int* …

Member Avatar for turrence27
0
183
Member Avatar for 3cats

I have looked around on this forum and none of the past posts really addressed my issue. I created a .txt file with cust no first and last name. I open the file and read in the first line of the file, this part works well. And it displays to …

Member Avatar for 3cats
0
166
Member Avatar for Marine4God

Hello everyone. I am working on my lab assignment and am somewhat stuck on how to proceed. We are studying using the book [I]Starting out with C++: From Control Structures through Objects[/I] by Gaddis. The lab assignment is as stated: [QUOTE]NamesOf1980s.txt is a text file from the SSA detailing the …

Member Avatar for Salem
0
907
Member Avatar for casjackkwok2001

hi all. The output I get always shows some really random numbers, such as -7883933849400000000000000.00 . Is there any thing i'm missing...any help would be really appreciated. PLEASE [CODE]// Specification file for the Inventory class. #ifndef INVENTORY_H #define INVENTORY_H class Inventory { private: int itemNum; int quantity; double cost; double …

Member Avatar for Salem
0
98
Member Avatar for tinkeydo

I have been writing a program that accesses data via a text file. I have recently been turned on to MySql which seems like it would be a more efficient way of organizing my data. If I am using Visual Studios to create both my database and my C++ program …

Member Avatar for Ancient Dragon
0
120
Member Avatar for sah15

I'm having troubles with a code for a program (involving classes) where I am supposed to input the three sides of a triangle and the program determines whether the triangle is a right triangle, equilateral, isosceles, and scalene, etc. I have only one error preventing me from compiling my program, …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for chec13

Hello, I just started trying to learn c++ a few days ago. Right now I have run into probems, which, has always happened when I try to learn a programming language. Can anyone help me fix this simple multiplication program? [CODE]#include <iostream> int Multiply27( first, second) { cout << "in …

Member Avatar for chec13
0
165
Member Avatar for coder19

[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define TRAINING_LIST "./rc/training.list" #define TRAINING_FILE "./training_set/%s" #define TEST_PATH "./test_set/%s" #define PREDICTION_FILE "./prediction.txt" #define FEATURE_FILE "./feat/features.txt" #define MAX_RATINGS 100480508 // Ratings in entire training set (+1) #define MAX_CUSTOMERS 480190 // Customers in the entire training set (+1) #define MAX_MOVIES 17771 // Movies in …

Member Avatar for coder19
0
91
Member Avatar for Naloth

I'm getting errors at every occurrence of my void definitions. "expected primary-expression before "void"" and "expected ';' before "void"" at my "void displayMenu ()" "a function-definition is not allowed here before '{" token" "expected ',' or ';' before '{' token' " At every future occurrence of void. Any ideas? I've …

Member Avatar for Naloth
0
160
Member Avatar for gnarlyskim

I'm working (well have been for the past few weeks) on a polynomial class to do different things between two polynomials: multiply, divide, get remainder, subtract, add. The coefficients are stored in a pointer to an array listed under private and the degree (also the amount of slots in the …

Member Avatar for gnarlyskim
0
86
Member Avatar for james8901

Hi folks. I have a text file with a thousands of rows of numbers in it. For example: 1 2 4 6 11 13 19 21 66 97 101 ........ 1 3 9 12 18 26 44 56 98 113...... ........... ...... What I want to do is find the …

Member Avatar for Ancient Dragon
0
157
Member Avatar for adams161

I have visual studio 6 and want to make a mfc dialogue application that is allays on top. By this i mean whatever programs you have open it will allays be on top. It's window will be fairly small so it doesn't get in the way. the reason for always …

Member Avatar for adams161
0
127
Member Avatar for Excizted

Hello :) My program is supposed to load some data into a buffer - but it fails. This is where i get a segmentation fault... [CODE]char* buf = new char[size + 2];[/CODE] Where my debugging tells me that size is correctly containing the value "1957" which is the actual size …

Member Avatar for Excizted
0
185

The End.