49,761 Topics
| |
Hi, I've been trying to create program that can access a binary file with a vector in it without first saving it to the file. If I just try to read from the file without saving something, the vector will have information in it but when I output it to … | |
hi every one, As I said earlier i am very very beginner in c++ and programming in general .Then,I hope you bear with me and help me. in pointer: if i definition a pointer as integer ********************************** int **p = new int*[M]; for ( int i = 0; i < … | |
Hey guys Am working on this program, a part of which requires the input fixed-point binary number to be converted to decimal for example; 11001.101 to its equivalent mixed decimal number...........any suggestions(a function would be excellent :) )? | |
Hello, I am in school programming a game using SDL. It's a simple game where the player shoots at ships, which spawns randomly. For this I call random function rand() each time in the game loop, then using the modulus operator to determine wether a new enemy will spawn. The … | |
I am in the progress of trying to write a C++ (Visual C++ compile) program that dynamically reads in files from a series of sub directories that the user inputs. I am trying to catenate several strings together to prevent to many input request from the user. I could probably … | |
Hello, I have a program that splits up a single .txt file into separate files (one per sales rep). The original text file has a layout that used to be printed on wide tractor feed paper. I am saving these output files as .doc's. My only problem is that, when … | |
Well, what i'm trying to do is use cin.getline with my char pointer of 255 characters, take a look at the code below: [CODE] #include <cstdlib> #include <iostream> #include <fstream> #include <conio.h> using namespace std; char * pChar[255]; pChar = new char[255]; void newPointer() { delete pChar; pChar = new … | |
I configure it like this ./configure --with-msw --enable-debug --enable-debug_gdb --disable-shared --enable-unicode --with-opengl and when I build it I get this error. /cygdrive/c/wxwidgets-2.8.10/bk-deps g++ -c -o baselib_appbase.o -D__WXMSW__ -I./src/regex -DwxUSE_GUI=0 -DwxUSE_BASE=1 -D_FILE_OFFSET_BITS=64 -D_LAR GE_FILES -D__WXDEBUG__ -I/cygdrive/c/wxwidgets-2.8.10/lib/wx/include/msw-unicode -debug-static-2.8 -I./include -Wall -Wundef -Wno-ctor-dtor-privacy -ggdb -O0 ./s rc/common/appbase.cpp In file included from ./include/wx/memory.h:16, from … | |
my problem is about checking the subject related to the user a text file structure as below: username_1 password subject_1 subject_2 subject_ n username_2 password subject_1 subject_2 subject_ n username_3 password subject_1 subject_2 subject_ n . . . username_m password subject_1 subject_2 subject_ n in my problem the user will … | |
I have a vector I need to delete every third element 123456 12456 1245 125 15 1 [CODE]vector<int>::iterator iter = v.begin(); while( iter != v.end() ) for( int i = 0; i < v.size() +2 ; i++ ) while( iter != v.end() ) { if (v.size() != 1 ) ) … | |
I have a "Tools" class which contains a lot of functions I commonly use. One is a parallel sort. I pass it a vector of Objects and a vector of indices, and it sorts the Objects and sorts the indices the same way (so the corresponding index is in the … | |
I have for example a ftp server with the address ftp.mywebsite.com On this ftp server I have a path: FileFolder\\file1.txt What I wonder is how it would be possible to connect to this ftp server and read/write to that file. Is there any good articles of how this is done … | |
How can I add image before the label like a warning sign?? and how can I make bold the label?? Thanks! [code] OkCancelDialog::OkCancelDialog():Gtk::Dialog( "Clear all calls", false ){ Gtk::VBox * vbox = get_vbox(); Gtk::Table * table = new Gtk::Table( 2, 1, false ); Gtk::Label * label = new Gtk::Label( "Please … | |
I'm attempting to read in various numbers and chars from a text file using ifstream. I've read through a lot of C++ File IO and can't see why my two int variables, numOfVars and numOfCNFs, aren't getting assigned in the Parser::BuildCQF() method. The code below shows my Parser.h, Parser.cpp, the … | |
i have to create a mini search engine given a directory of 50 documents and a set of sample queries. i need to include the documents in a hash table and search through the documents for the keywords in the queries.. i have no idea where to start... can anyone … | |
Hey, I have a program that has 5 files, 2 header files called: [icode] console.h screen.h [/icode] and 3 source files called: [icode] a2main.cpp screen.cpp console.c //not a typo [/icode] When I copy the [icode]main[/icode] from my a2main.cpp file to my screen.cpp my program compiles without a problem. But when … | |
Hi, Im working on a school project and could use some help. Im having trouble storing data in an array of structs. My program has to read student data from a file and store the information in a struct. Im having trouble passing my array struct into my fuctions, and … | |
i have created 27 cubes using opengl and c++ and assembled for rubicks cube but not able to write rotate function for a slice.how to do???? | |
ok i need a quick help here...... here it's my problem It's approximate value of Ï€ is 3.141592653589793 Below are five di fferent series which can be used to approximate Ï€: you can se the series here:: [URL="http://i44.tinypic.com/2ujtmxw.gif"]http://i44.tinypic.com/2ujtmxw.gif[/URL] ask which series he/she wants to use and the precision (number of … | |
You have a necklace of N red, white, or blue beads (3<=N<=350) some of which are red, others blue, and others white, arranged at random. Here are two examples for n=29: 1 2 1 2 r b b r b r r b r b b b r r b … | |
I have a simple program that I am having trouble debugging. It contains two different problems. 1. If I run a MessageBox in this program after the program is up and running, the program crashes. I have to call the Task Manager to shut down the program. 2. SetTimer will … | |
Hey Im writing a program that needs to send data over http, sometimes 45 minutes between packets, sometimes 10 seconds. I noticed that when i shut the server down it sends a lot of fin packets... so i guess my socket logic is off... i dont have a lot of … | |
i finished the program but the input of 0 and one is too much i want to know how to have it read from a file i understand i have to use inFile. open but where do i put it i put my whole program in the thread: #include <iostream> … | |
Hi, I'm a new comer. Can anyone tell me how to [B]access to the audio streaming in Smart Device[/B] using [B]c++[/B] (for Pocket PC of Windows Mobile)? I would like to use it for my future speech recognition application. Thx for reply. | |
Hi, I'm doing a project where we make our own string class and I'm having trouble with the substring function. This is what I have so far. [CODE]string string::substr(size_type idx, int length) { // can use the += char somewhere string *someString; char *ch = _data; for(idx = 0; idx … | |
hello everyone i am a fresh man in this site ... and i'm really pleased joining this lovely 'n useful one well .. i made a program in c++ which is all about natural merge sort on files , since i want to sort my file which contains a randomly … | |
I hope this doesn't come across as confusing. I am doing something wrong, with a "error C2059: syntax error: ';' - line 45; error C2059: syntax error : '/' - line 47. I'm not sure, but maybe it has something to do with the %, and that I didn't use … | |
hi, [COLOR="Red"]I need the answer as soon as you can[/COLOR] Write a c++ program that prompts the user to enter an integer number greater than Zero (0) and prints a multiplication table up to that number. The program should display an error message an and loop until an accepted value … | |
Hi How to get cpu utilization of particular process without using top command. I want programmatically C or C++.Top command source is large.I can't analyze where %cpu usage got. Anyone help me........... | |
Greetings fellow coders, I am using the Playsound() function for playing music or sounds in my console based C++ application. I have a few brief questions that I need answered before I can continue. 1. When using the Playsound() function, how do you set the volume level? 2. How do … |
The End.