- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 11
- Posts with Upvotes
- 9
- Upvoting Members
- 6
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
I have several files to include from a subfolder and I just can't get this to work. I'm propably missing something here... The Makefile and .cpp with main function are located at /path/to/ and files to be included are at /path/to/src/buffer and /path/to/src/hash. Both of these folders have .cpp and … |
|
Hi, I'm having a strange problem with my linked list program. This is slightly embarrassing because I'm getting back to coding in C++ after 4 years and don't remember much. This is the code [CODE]#include<iostream.h> #include<conio.h> #include<string.h> void printList(struct node *&); struct node { node* next; int data; }; int … |
|
How can i read some number from a text file and then go back to read some other information? All i know, is read it from the beginning to the end, but even when i check something for ex if(fgetc(in)!=...) goes forward one character, and all this messes up my … |
|
new to c++, working with vectors my question is can a string in a vector hold for example a string like " super mario bros" ( with the spaces) to continue i am trying to to make a list that people can add to , and if user where to … |
|
im trying to make a program with win32 GUI and im having trouble getting this to compile. Here are the errors im getting [QUOTE]D:\Documents and Settings\Skull\Desktop\Dorzon\main.cpp||In function 'BOOL DialogProc(HWND__*, UINT, WPARAM, LPARAM)': | D:\Documents and Settings\Skull\Desktop\Dorzon\main.cpp|57|error: 'ShellExecute' was not declared in this scope| ||=== Build finished: 1 errors, 0 warnings … |
|
I'm making a project with OpenCV about tracking. But what I want is the ability to let the user import his own tracking algorithms. Is there some way that i can check in a specified folder if there are new algorithms added and how can I include them in my … |
|
I have made a header file for SDL GUI applications. I was testing the SDLGame::Draw() function when I got a SigSegV fault. The fault occurs in different locations each time I run the program. Also sometimes instead of a SigSegV fault I get a SigTrap fault. Here is the code … |
|
[B]Okay, I finally understand that they point to memory, because I knew that all along. I just wasn't aware of why they needed to point to memory for. So I need to use pointers in this position but I don't know where to use them or on which things and … |
|
if numInput isnt an integer I want it to prompt "Invalid Try Again" and ask for input again [CODE] std::cout << "Enter a Number (Max 10 digits)(99 to Exit): "; std::cin >> numInput; [/CODE] |
|
I m trying to print the prime numbers using Sieve of Eratosthenes But, my output is 0 for all. please tell me where i m wrong. Thanks for help [code=c]#include<stdio.h> #include<conio.h> int main() { int arr[100],i,j=1,val=0,mod,num=0,k,l; for(i=0;i<100;i++) { arr[i]=j; j++; // printf("\n %d",arr[i]); } for(k=1;k<100;k++) // checking number and replacing … |
|
Hi all. I am having trouble with these inside a loop I have. The loop is used to fill a struct and I want to check each input before it is accepted. It works fine if the input is what is expected but doesnt if it is incorrect input. Here … |
|
Hi ~ As you can see from the code below I am in school for programming. I have come across this homework assignment a few times on the site already however the requirements for mine are different. I cannot use arrays. Three functions - I only have two coded. The … |
|
I'm trying to write a program that outputs the cent symbol (¢) in Visual Studios 2010 and when I copy and paste the symbol into my text it outputs a completely different symbol. I've also tried using \u00A2 and I still get a different wacky symbol. What is the C++ … |
|
Hello, I'm sorry for the bad title for this, but I honestly have no idea how to define this by few words. My problem is this, I need to read a bunch of data from a text file into an array, in the theoratical aspect, it's all nice and should … |
|
Hi, friends Can anyone tell me more efficient answer of this question. Q:-As we all know when we any object by value to a function then a temperary object is created. I observe that the destruction of this object occurs differently in different situations like . 1):- If we call … |
|
Hi I have a GUI created using VC++. I want to read the value or content from a text box of another GUI in windows(dont have sourec for this GUI). Can you pleae suggest me how can i do this, please also point me to some basic tutorial or books … |
|
how can i do this ? the error was lvalue required. [code]#include<iostream.h> #include<sting.h> #include<conio.h> #include<stdio.h> struct movies_t { char title[50]; int year; } mine, yours; void printmovie (movies_t movies_t); main () { clrscr(); struct movies_t mine, yours; mine.title="The Curious Case of Benjamin Button"; mine.year=2008; cout<<"Enter title:"; gets(yours.title); cout<<"Enter year:"; cin>>yours.year; … |
|
Hey guys, I'm making a small game on c++ using code::blocks.I use winbgi graphics for doing it. Its basically a ball game like dx-ball. I am an amateur programmer and I did upto making a moving ball which will rebounce whenever the boundaries of the screen are encountered.My method is … |
|
hi, could someone help me fix the code for the following question: I need to create a program that determines the animal corresponding to an input year of birth. Assume that the input year is 1900 or later. The 12-year animal cycle is rat, ox, tiger, rabbit, dragon, snake, horse, … |
|
[CODE]#include <iostream> #include <fstream> #include <iomanip> #include <cmath> using namespace std; int main() { char fare; char choice='Y'; int hrIn, minIn, hrOut, minOut; int hours; int minutes; int total_minutes; double cost; float charge; while(choice=='Y'||choice=='y') { cout << "\nThis program will calculate a group " << "\nfare amount which is then … |
|
[CODE] #include<iostream> #include<fstream> #include<string> using namespace std; int main() { cout<<"Start entering your text\n Put a * to terminate\n"; ofstream fout; fout.open("1818.txt"); int i=0; char c; while((c=getchar())!='*') { fout<<c; } fout.close(); ifstream fin; fin.open("1818.txt"); int word=1; int line=0; int vowels=0; while(fin) { fin.get(c); if(c==' ') word++; else if(c=='\n') line++; else … |
|
Hi, I am writing this template Array class. I am trying out some different functions, anything I can think of to implement. I have written an Add function as follows: [CODE] /**Add function - adds an element at the top of the stack**/ //creates new Array 1 larger //sets position … |
|
i have to impplement a dynamic stack to create a program but when i try to compile my stack.c file(with gcc) I get a bunch of errors here are my files GLOBALS.h [CODE] #ifndef _globals #define _globals #define DATA( L ) ( ( L ) -> datapointer ) #define NEXT( … |
|
[CODE] #include <iostream> #include <cmath> #include <iomanip> using namespace std; int main () { int numb, sum, divis3, divis5; numb = 20; sum = 0; double value = sqrt(numb); cout.setf(ios::fixed,ios::floatfield); cout << setw(8) << left << "NUMBER" << setw(8) << left << "DIVIS3" << setw(8) << left << "DIVIS5" << … |
|
With respect to the following code segment, what should be the n value in different classes, e.g., what is a.n, b[2].n, and c->n How to analyze them? [CODE]#include <iostream> using namespace std; class CDummy { public: static int n; CDummy(){ n++ ;}; ~CDummy(){ n--; }; }; int CDummy::n = 0; … |
|
The Assignment is: Write a class named Car that has the following member variables: yearModel, make, speed. In addition the class should have the following constructor and the other member functions constructor-accept the cars year model make as arguments. an assign to the objects year, make also assign speed 0 … |
|
Here is my code: [CODE]#include <iostream> #include <fstream> #include <iomanip> #include <cmath> #include <time.h> #include <assert.h> using namespace std; int main() { // = (num3&&num4) - (num1&&num2); // save this calc for later: hrIn + (hrOut/60.0); // same thing = num3 + (num4/60); // write an alogorithm to establish the … |
|
I'm trying to create an array of my object I made, and basically the object doesn't have a default constructor, only a self made one. I've made my object array in the header file e.g. Object myObject[4];, however doing it this way requires for me to have a default constructor, … |
|
I don't know how to get the program to display properly any tips? Also would anyone guide me on how the logic works for deallocating all this memory please. [CODE]#include <iostream> #include <cstdlib> #include <windows.h> using namespace std; struct Entry { char name[23]; int age; Entry *next; }; // Prototype … |
|
I have a class that stores all of my variables and functions (for our purposes, DataClass), and a few different windows form classes that use the public variables and functions in DataClass. I need to keep the values of the public variables in DataClass until the program closes. I set … |