49,761 Topics
| |
Hello All, Not sure this is the right forum, but I have a Visual Studio question. I am used to using code::blocks as an IDE. My current instructor likes to use Visual Studio 2008, so I am trying to adjust. One big difference I have found is that when a … | |
I'm a C++ student, and I'm almost there on this assignment, except I can't get the search function to work correctly. The search function should accept a search input from the user, then list all the items related to that input. In this case, its all the tasks related to … | |
Hey all, I'm fairly new to C++ and am trying to write a program that continues asking the user for a number until "0" is entered. I am supposed to count the number of positive, negative, odd, and even numbers that the user has entered once the program is terminated(0 … | |
Hello! Im writing a program that outputs some triangles and such. And I want to count the written *s. If anyone would help i would really appreciate it. Code: [CODE]#include <iostream> #include <string> using namespace std; int main() { char znak; znak = '*'; int st_vrst = 0; int ploscina_trikotnika, … | |
I am a newbie who just graduated. I found my first job and begin to review some legacy codes And I find out there are a lot of macros which could be replaced by function (somebody especially c coders may think macro is a better choice) Not even that, I … | |
In writing a logging program for a SDK Engine, I have come across some problems. The logging function works fine when called with test programs, but when I run it in a full test of the SDK Engine, no file is ever created. I added some testing lines to make … | |
Please take a look at the following code. When I do not put my pointers in an array the code works. See the commented out section. I thought it would be nice to do an array as I could then have more control over my output. I could also add … | |
I'm having a bit of trouble figuring out what i'm doing wrong with my overloaded operators Header file [CODE]#ifndef SavingsAccount_H #define SavingsAccount_H #include <string> using namespace std; class SavingsAccount { friend istream &operator >>(istream& input, SavingsAccount & ); friend ostream &operator <<(ostream& output, const SavingsAccount & ); public: SavingsAccount(); SavingsAccount(string, … | |
I'm new to generic programming and I just cant figure out what is wrong in this . The program is supposed to make a linked list using class. I have used 2 classes so that a single object of class LL can be used to manipulate a linked list . … | |
Hey all I need to convert audio file of wav format into text file in order to feed it as input to an encryption algorithm(IBE encrypt method of [URL="http://www.shamus.ie/"]Miracl[/URL] library takes only texts as input) and have to reconvert the decrypted text file to audio format. Could you please suggest … | |
I am having a problem with trying to copy a "char array to an int array". I have a code to randomly picked an amount of character and (in progress) print out how many occurrences, even if it's not in there a letter has. For now I'm only doing upper … | |
Well I noticed recently that the more unusual bool operators arnt there. How would I use them? Ex: xand, NAND, nor, etc. | |
plz help me to know..whether this pointer in c++ is public access or private access | |
[CODE]struct ch8_struct { int field1; short field2; char field3; int field4; double field5; }; struct ch8_struct g_StructArray[3]; ch8_struct *g_pStructArray = g_StructArray; ch8_struct **g_ppStructArray = &g_pStructArray; g_ppStructArray[1]->field1 = 11;[/CODE] program is crashing on g_ppStructArray[1]->field1 = 11; i think my pointer notation is wrong :) | |
I'm getting the error for the following code "error C2664: 'KaibaMainPhase' : cannot convert parameter 1 from 'void (__cdecl *[2])(std::vector<_Ty> &,std::vector<_Ty> &,std::vector<std::vector<_Ty>> &,std::vector<_Ty> &,std::vector<_Ty> &)' to 'void (__cdecl *)(std::vector<_Ty> &,std::vector<Card> &,std::vector<Card> &)" [CODE]class Card { public: string GetName() {return Name;} void SetName(const string& setName) {Name = setName; } void SetType(const … | |
Problem: our program is syntax-wise correct, the problem is that it is not evaluating power operation for alphabets, can anyone help it is urgent a+b*c/d^e also tell the output for this expression #include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> #include<ctype.h> #include<math.h> #define MAX 20 char stack[MAX]; int top=-1; char pop(); void push(int val); … | |
[code] # include<stdio.h> # include<stdio.h> # include<process.h> # include<stdlib.h> # include<ctype.h> # include<conio.h> # include<mem.h> unsigned char huge Data[100001]; unsigned char keystream[1001]; int Rpoint[300]; void main(int argc,char *argv[]){ FILE *fd; int i,j; int size; char ch; char *name; int cracked; int sizemask; int maxr; int rsz; int pos; int Rall[300]; … | |
Hello everyone.. I have char of an array I need to stop reading from the array if I reache to newline.. the array cosists of characters of a text file but I need to stop reading when I reache to first \n or endl.. I tried to use this while(code[i]!='\n'){ … | |
is there is any way to access 3rd element of a linked list without using arrow operator?? | |
I'm trying to do disk reads and writes when programming in C++ in the win32 console mode. I can create the file on disk using CreateFile(), but I can't figure out how to read or write to that file. I used the ReadFile() and WriteFile() functions but I just get … | |
Hey, guys. I'm new to this forum and this is my first post ever on this site. I am currently a freshman in Penn State University and I am having trouble with my C++ class. I have a group project but have no idea where to start with this program … | |
This is code for the slope intercept formula y = mx + b I am supposed to find the slope (y2 - y1) / (x2 - x1) and have the user input the b for the y = mx + b in my program. Once the user does that I … | |
Hello I'm trying to figure how can I just a while or what statement to either stop at the next delimiters or stop at the end of the line. here's my code: [CODE] while( getline(i_file, arrayl, ';')){ cout<<"check 1"<<endl; istringstream iss(arrayl); iss>>array; cout<<array<<"<~~~~~~~~~~~array!"<<endl; int num [array]; int i = 0; … | |
Hello. Is there a way to move to the mouse cursor on the screen using C or C++? I am using windows vista and Microsoft visual studio 2008. I am pretty new to C so I don't know much. I have read previous threads which said that you need to … | |
When I run my program it prints out the number for the forty eighth sequence as being -132375223 when it should read 4807526976. What am I doing wrong? -Towey [code] # include <iostream> using namespace std; int main () { int x1=0; int x2=1; int fib; for (int i = … | |
I'm writing a Level Editor but my program is shows the X,Y,Z positions like DWORD(unsigned long). I want to show them like a float but I can't find a formula or function for that. If you know something please reply! | |
I've looked into all the other threads and I am still lost. [CODE]#include<iostream> #include<cmath> using namespace std; //Prototype's ////////////////////////////// double functiony(double); double area(int, double, double); // Main ////////////////////////////// int main (void) { //Solving for y=x^3 using k as y and d as x double k; double d=0; k = functiony(d); … | |
[code] void test(std:shared_ptr<some_type> A) {.....} [/code] would make a copy of a shared_ptr what if we pass a shared_ptr into a function like [code] void test(std:shared_ptr<some_type> const &A) {.....} [/code] Is this safe? Thanks a lot | |
When on the digital mars website he advertzed that their compiler could use all 80bits of a 32bit machine. What the heck does this mean? | |
So I need to do this following program and I'm totally confused at the moment. Can someone please help me? Your help will be greatly appreciated. Objective: 1. Write a program that incorporates function modules 2. Use appropriate function declarations 3. Use function headers and write function procedure 4. Use … |
The End.