- Strength to Increase Rep
- +9
- Strength to Decrease Rep
- -2
- Upvotes Received
- 30
- Posts with Upvotes
- 28
- Upvoting Members
- 24
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Hi everyone, This might be a very stupid question to ask and the answer might be very simple but I was just curious to know this. How to display "\n" on output screen in C++? We all know \n is used to enter a new line. But what if I … |
|
I know the dos command is "shutdown" then with your parameters of "-s -t xxx" etc. Anyways so "How to shutdown your computer using C++?" Thanks, Regards X |
|
[CODE=C++] #ifndef LIST_H #define LIST_H #include <iostream> typedef char Item; class List{ public: List() {first = NULL; last = NULL;} //~List() void append(Item entry); void remove_last(); void output(); private: struct Node { Item data; Node *next; Node *back; }; Node *first; Node *last; }; #endif [/CODE] I'm writing a class … |
|
Is there a function to remove spaces from a string? I need a way to have a user input a string with spaces, numbers, and letters and remove all spaces before storing it. Using scanf, cin, gets or fgets, apparently I only retain whatever is before the first space. |
|
i just want to whether there is a replacement for getch() in C++. my friend said getch() is C function. thanks! |
|
I need help with transposing a matrix. I already did the transpose matrix using 2 arrays. But I can't figure out how to do it using only one array. So read a matrix and create the transpose within itself. Do I use the swap or what? Any help would be … |
|
I know these functions in C, but in C++ they doesn't work. What is replacement for these functions in C++ ? Thanks. |
|
Hello!!! I read 3 c++ books on dos and what now? I think i want now to programming on windows but which language i can programming ? |
|
Hey all, i have been reading some c++ books and they talk about a variable type called float but they also mention another one named double and another one named long double but what i don't understand is the difference, the furthest i get is that they tell me float … |
|
how can i make the ide word wrap when i am writing lines of code, the code goes so far in width that I have to use the arrow button on my keyboard to see the end of line dev c++ 4.9.9.2 windows xp |
|
Ive have developed a Program That enables the user to Make a process of There choice load a "hello World" Dll, But the user has to Input the Processes PID. I have two problems, 1. How do I Retrevive the process PID from process name? 2. My Program has the … |
|
[code] The following code lists the nodes in a binary tree in two different orders: preorder:C,B,A,E,D,F,H postorder:A,B,D,H,F,E,C Draw the binary tree. The answer is : C / \ B E / / \ A D F / H so, my question is how should i think or is there any … |
|
Hi, I want to create multiple executables corresponding to their .c files in one target rule. For example, I have prog1.c and pro2.c, how do I create the executables prog1 and prog2 from just one target? By target I mean something like this test: [I]dependencies[/I] [tab] [I]command rules[/I] Thanks in … |
|
Hey all. I have worked with a project to create a basic student database/registration system for the past 4-5 projects... slowly adding more functionality or using different containers and classes etc. For this next project, i am to use the code from a website online which contains all the nescessary … |
|
I'm a .net programmer so forgive me if this is a stupid question, but here goes. I'm working with a vendor to interface our system with theirs. We are sending text data via modem. The protocol specifications they have given us require a checksum value to be appended to the … |
|
hello the problem that i am facing is that whenever i click on the tc icon to start the compiler, the screen turns black first (which is normal). and then after about two seconds the compiler is exited from even without starting it. Even when i try running the exe … |
|
Ok so I want to create some code which can generate a random number from a 1. Music file 2. A microphone PLEASE is their anyway i can do this |
|
After this code executes [CODE] ptr = new myStuff; // some code ... delete ptr; [/CODE] the memory allocated is freed but ptr still contains the mem addr of the 1st byte of the previously allocated mem. Is there some history to this? Why didn't the C++ standard also have … |
|
Hey everyone, I'm trying to make it so that my ^ operator is right justified within this binary expression tree. For example, 2^3^4 should be evaluated as 2^(3^4). So I should get 2^81, instead of the usual 2^12. Here is the code I have so far. Everything works, except the … |
|
how do i concatenate a an array. This is the code. [code] char data [128]; char c, s, l; char *cmd_array [128]; count = 0; char * pch_W; pch_W = strtok ( inbuf, " " ); while ( pch_W != NULL ) { cmd_array_W [ count ] = pch_W; pch_W … |
|
So, I have to write a program that calculates the five number summary of a .txt file with 2 columns and n rows. A snippet of the file would be 23 7.8 27 17.8 39 26.5 41 27.2 From this I am trying to input the numbers into a vector … |
|
I am getting the above error when trying to compile.. main.cpp [code=cplusplus] #include <windows.h> #include <string> #include "resource.h" #define GETITEM(item) GetDlgItem(hWndDlg, item) static bool keeprunning = true; static bool keeprunning1 = true; static bool keeprunning2 = true; static void run(); static void breakrun(); static void lunchrun(); static void end(); static … |
|
Hey everyone. I'm new to the forums and to C++, and I was working on a program used to call data from a file containing various information about cars when I ran across the error: undefined reference to (and then it proceeds to list all of my declared functions). Here's … |
|
i am trying to get my program to cout only certain arrays but i keep getting 0's and bus errors and segmentation faults. i think i have the general idea but i cant find a way to fix this problem. [code] #include<iostream> #include<fstream> #include<cstring> #include<iomanip> using namespace std; void findvin(int[],string[],string[],int[],int[],double[]); … |
|
[code=c]printf("reading input image ... \n"); /*unidata.image = (image_ptr*)read_pnm(argv[1], &(unidata.rows), &(unidata.cols), &type); */ printf("hello.jpg"); printf("image read successfully \n"); printf("rows=%d, cols=%d, type=%d \n", unidata.rows, unidata.cols, type); /* error here*/ printf("well"); [/code] the errors are coming between the two final printf statements. when the read_pnm() is left uncommented it is a segmentation fault, … |
|
hi i need help writing a program that will read in input file containing c++ code and then checks for grouping matching symbols like { } ,[ ] ,and ( ). if there is a mismatch symbol in the input file the the program will read and recognize the error. … |
|
Provided the following template: [code=cplusplus] template <class T> class MyTemplate { private: T myData; public: MyTemplate(const T &data) : myData(data) {} bool Contains(const T &); }; [/code] Is there a way to ensure at compile time that the argument T derives from another class? I want T to derive from … |
|
Hi guys , after finishing my text based game , when i send the executable file to my friend he cannot open it .. he get an error that smth is wrong in configs file .. he also has framework installed |
|
Following is my client code....I am receiving data of equal size of JPG file... so if anyone can help me out with reading buffer properly and writing it in to jpg file at client side ================================================ do { memset(buffer,0x0,BUFFER_SIZE); // init line rc = read(sd, buffer, BUFFER_SIZE); if( rc > … |
|
Hi, I've written a program that reads object information from an ASCII file (exported from 3dsmax) so that an object/objects can be reproduced in OpenGL. It works fine at the minute and can read multiple objects from a single file but what I want to be able to do is … |