48,986 Topics
| |
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 … | |
Hi All, I am tring to using the below function to read in a .txt file, which consist of a 10x10 matrix number. I just cannot find out where goes wrong, it appears such a funny number -858993460... [CODE]void readinput(int in[][MAXCOLS]) { int row ,col,ip; //Declare row,col, ip as int … | |
What is the difference between Release and Debug modes in Visual Studio while building a project? | |
Ok simple question. Google didn't bring up much and I need this. This is the question: How do I interact with non-text files in a simple console app? | |
i want to do a project using graphics in c++..i am going to start with a simple project, because i am a beginner.. plz tell me which websites to refer in order to get help on topics and to learn about graphics in c++.. thank you.. :) | |
why encapsulation voilate at the binary representation of any source code? | |
[code] void test_rr(std::string const &lvalue) { std::cout<<"this is lvalue"<<std::endl; } void test_rr(std::string &&lvalue) { std::cout<<"this is rvalue"<<std::endl; } int main() { test_rr("this is"); //will output "this is lvalue" std::cout<<"system pause"<<std::endl; std::cin.get(); return 0; } [/code] how could I treat "this is" as rvalue reference? The easiest way I could think … | |
I have been asked to implement airline Reservation Simulation system using Data structures as part of B.Tech Minor Project. I have good knowledge of C++ but none of Visual C++ (except how to draw forms). But we also need to implement UI. So we are thinking of implementing UI using … | |
Hello. I have a problem and I would love it if I could get some insight on it. I have read the forums with many answers about the subject, but I'm still having problems so I'm writing here. Basically I was following [URL="http://tom-shelton.net/index.php/2008/12/11/creating-a-managed-wrapper-for-a-lib-file/"]this[/URL] guide which is for creating Managed Wrapper … | |
I'm using Visual Studio 2010, Win 7, MS Access 2010, C++, Direct ODBC, 32 bit. The first SELECT statement executes. The INSERT, SELECT, SELECT and UPDATE statements don't nay help is appreciated. Thanks. [CODE] #include <windows.h> #include <stdio.h> #include <sqlext.h> const char* DAM = "Direct ODBC"; SQLCHAR szDSN[256] = "Driver={Microsoft … | |
Just wondering, how high can c++ really count? Because I made a fibonacci program, and it starts acting weird and printing negatives at about 10-11 places. With both long, and int variables? Is it impossible to count higher? If not, how? | |
I can not figure out how to go to the next line. In the data we read in number of test on the 1st line then student names followed by their test scores on the following lines. My problem is I can only get the first student and his average … | |
What I want to do is read a whole paragraph of text from a custom file. How would I do this without doing something silly like this? [CODE]while(someFile >> word1 >> word2 >> word3){ //etc. }[/CODE] I need to be able to read 3 numbers for todays date, then read … | |
Ok when I use gcc (all th time) the program it makes in c++ with debug on is around a megabyte when off it is around half a megabyte when working with c with debug on it around 50 k with it off it's at about25 k this doesn't seem … | |
[CODE] #include <iostream> #include <fstream> #include <string> using namespace std; string constestantName(istream &); void getJudgeData(istream &, string); void CalcScore(ostream &, string, double, double, double, double, double); double findLowest(double, double, double, double, double); double findHeighest(double, double, double, double, double); int main() { int loopnum, counter, nestcounter; string name; ifstream infile; infile.open("starsearch.txt"); … |
The End.