49,761 Topics
| |
I have been reading up on this forum looking for answers to my own questions but i find myself stumpped. I basically have to read from a file the last ten lines of input. Yes this is for a homework assignment and i have spent hours on it reading my … | |
[CODE]//This a partially completed prototype of project 2 //currently use file FlatData1.dat as its initial roster #include <iostream> #include <fstream> #include <vector> #include <string> #include <stdlib.h> #include <cstring> #include <algorithm> using namespace std; typedef enum { thisWeek, nextWeek } WEEK; typedef enum { clean, wash, shop } DUTY_TYPE; typedef enum … | |
So, Daniweb. My teacher has been teaching us some old C++ (a problem I've been trying with little avail to rectify). I need y'all wonderful people to look over a section of code that I'm having trouble with. It has to do with recognizing a letter in an if statement. … | |
I wanted the program to display each piece with its assigned color preceding it (eg a white rook would be 'WR'). [CODE]#include <iostream> using namespace std; struct attrib{ char x; int y; char cont[5]; char clr; }; attrib brd[8][8]; void prntbrd(void) { for ( int y =0; y<8; y++) //accesses … | |
I have a list of names and I want to write them to file called (newfile) and then push them in vector and then i want to add a name to a list so i will push it in the same vector and then iam trying to write again the … | |
Good Day, I will be starting a course in C++ soon and i was just looking over the internet for some examples and practise questions. I found this question very interested as these topics are on the course outline. Is it possible for you to assisst me in doing this … | |
This is my code which determines it a lottery number is a winner or a loser. I have specific numbers that it needs to go by. My code compiles and it congratulates the user if when I type any of the numbers, however, if I type in 12345 or several … | |
Hi everybody, I am not new to c++ but am far from a intermediate. I would appreciate any help or suggestions. However, my problem is I need to store dynamic data into different variables. For example time. I am trying to write an if statement that would take time store … | |
I simplified an issue I'm having in another program with the small program here. The program is supposed to open the file with function openFile(). Then I want to initialize char a to the first character in the file via function accessFile() and output that character. My problem seems to … | |
The book asks me to do the following: Note that the function from the previous exercise and the functions from §6.2.2/113 and §6.2.3/115 do the same task. Merge these three analysis functions into a single function. the three functions are: [CODE]double average_analysis(const vector<Student_info>& students) { vector<double> grades; transform(students.begin(), students.end(), back_inserter(grades), … | |
how can I hook the LoadLibraryA API? I am googling a lot but I can't find any piece of code that helps me doing what I want to. I just want to intercept it and display in a message box what is the name of the DLL that the program … | |
Hi, Thank you for helping. My source: [CODE] #include <iostream> #include <cstdlib> #include <exception> using namespace std; void MyQuit(); void mamama() throw(char *); set_terminate(MyQuit); int main() { mamama(); return 0; } void MyQuit() { cout<<"Uncaugh specification!\n"; } void mamama()throw(char *) { throw "this is end!\n"; exit(5); } [/CODE] And I … | |
Hello everyone.I just have a curiosity which i think i won't be able to satisify by myself. Say we have this function : [code] extern "C" __declspec (dllexport) void whatever () { printf ("%s","whatever"); } [/code] if you try to call it from a process like this [code] typedef void … | |
I've got this "simple" Fast Fourier transform code here, but being a beginner I'm not sure how to use it! I just want to know what the required input is, how do I input it, and what is the output? Can someone give me a hand at interpreting this please? … | |
Hello Everyone. Could anyone please help me solve this problem. I am actually new to using STL. I have been given a task of searching a file of over 60000 records. The data extracted from the file is stored in struct and that struct is in turn stored in vectors … | |
Hi guys, quick question. Does the structure [CODE] try { } catch { exit(0); } [/CODE] require the preprocessor directive [CODE]#include<cstdlib>[/CODE] to be declared at the beginning of the program? The thing is if I don't declare it the visual c++ compiler works fine but if I try in Unix … | |
hi, i hav borland 5.02 compiler running on my win7 64-bit compiler,it is not supporting <graphics.h>header file,can some1 tell me plz hw to fix this problem?......... thanx in advance | |
I am just starting a programming class in C++ and my teacher hasn't taught anything about writing pseduocode and programs, yet expects us to be able to do so. I need help!!!! 1. Write out a complete algorithm in pseudocode for the following: User enters two uppercase letters or two … | |
Hi guys I'm struggling to write a code for traversing a directed graph. It contains City as nodes. I'm trying to put City(s) to a LinkedList and then work with them to find the path. However, as you will notice I'm still newbie in C++. I have a *nextcities as … | |
Hello All, Back again...Working on a program which requires that the user should be able to interact with the program. The objective of the program is this: A class called unique-bag which will store integers using dynamic array. This class stores only one copy of any given integer (no duplicate … | |
Hey y'all, I have been working on a tensor library (Nth-order multi-dimensional arrays) and I've been having trouble coming up with a good scheme for a multi-dimensional iterator template. Basically, I have a class template "tensor_container" which stores all the values of the N-order array (as a std::vector of one … | |
Hi all! This is from my code: [CODE]struct R3 { float x; float y; float z; R3(float, float, float); R3(); }; R3::R3(float a, float b, float c) { x = a; y = b; z = c; } R3::R3() { x = 0; y = 0; z = 0; } … | |
Hi there, Could some1 tell me whats wrong with this code...I know i shudnt b using an int variable but whats the right one for a string... [CODE] #include <iostream.h> void main() { int a,b; cout <<"Enter the first name"; cin >>a; cout <<"Enter the 2nd no"; cin >>b; ((a=="Tom") … | |
I've read the documentation [URL="http://msdn.microsoft.com/en-us/library/ms644906(VS.85).aspx"]link[/URL] and several threads explaining how to make a timer. Now after hours I still can't get my test to work. In the testDlg.h header I declare: [code] UINT_PTR m_uTimerId; CString textControl1; // Controls an Edit Control afx_msg void OnBnClickedButton1(); afx_msg void OnTimer(UINT_PTR nIDEvent); int myX;[/code] … | |
So I'm trying to write this time keeping code for a project of mine. Basically, I'm adding 0.01 to a variable over and over again. While (A < B) { X = X + 0.01 A = A + 1 } I have written down the basic idea. The problem … | |
I want to make a program which will send POST request to a web server. And also able to send required cookie(provided by me). Example. [url]http://www.somesite.com/requesthandler.asp[/url] POST DATA::::::::name=some_name&age=19 //i will provide the post data Cookie to be sent::::JHFFHJBSVB848X489CNU98C4Y //I'll Provide this cookie My desired application should POST the "POST DATA" … | |
Hi guys, I know what is meant by vector <string> myvector as it will just take every inputs as string when we are trying to store the inputs in myvector. e.g. myvector.push_back(nick) but what about if we declare the type of vector become like vector <FLATMATE> myvector? Why it won't … | |
What is a differrent between sorted and unsorted lists? The important points... | |
[CODE]i have problem in running c++ program.iam getting more errors .can u help me to run it.[/CODE] | |
Could someone please give me some advice as to why, when I run my program I get a segmentation fault? The code is posted below: #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; typedef float Elem; struct Vector { unsigned short int size; Elem* array; }; // Instruct user … |
The End.