49,761 Topics
| |
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 | |
[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; … | |
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 , … | |
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. … | |
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 | |
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 … | |
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??? | |
dear sir, i am new to multimedia prog. i am searching for live video streaming c c++. can u help me pls | |
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 … | |
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 << " … | |
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 … | |
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 … | |
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: … | |
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 = … | |
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 … | |
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 … | |
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 … | |
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* … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.