- Strength to Increase Rep
- +9
- Strength to Decrease Rep
- -2
- Upvotes Received
- 21
- Posts with Upvotes
- 20
- Upvoting Members
- 14
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I have a fairly simple question, which may or may not have a simple solution. How can I run the system(); command, in a win32 (not console) application, without the black command prompt window flashing on the screen? If relevant, I am using Dev-C++. |
|
Hi, I am trying to make small game , but I am confronting with a problem. I have a function that should add a new button to my form when it's called. The problem is that I don't know how to create a new object (a button, a shape or … |
|
Hmm... I've made it my top priority to get a Master's and Ph.D in Computer Science and Software Systems... however I'd like to know what a suitable Master's Thesis would be? I'm thinking about making a book, maybe 6000 pages long, pertaining to nothing but Software ideals and technology. This … |
|
Hey Everyone, I'm doing a little test for a presentation I'm giving on Tuesday. I wanted to show the performance difference between VB2008, C# and C++. To do this, I have three programs. Each program performs the Fibonacci sequence X times, and can either do it iteratively or recursively. As … |
|
Just need help with regards to this part, i'm meant to use scanf() to read a string from keyboard and return number of characters read, so i'm supposed to read a character string. The scan must then terminate at whitespace. A null character is stored at the end of the … |
|
[CODE] #include<stdio.h> #define MAX 4 main() { float A[MAX]; int i; for(i=0;i<MAX;i++) scanf("%f",&A[i]); return 0; } [/CODE] im using Visual C++ and doesnt give me any compilation error it keeps giving me a run time error after i enter the 1st number i can't figure out whats wrong :S help? |
|
Can't seem to figure this out. [CODE] string *array; void addNodes(string names[]) { array = names; //how many elements in the array??? } [/CODE] |
|
Ok, my problem is that I'm reading from a file 3 values, a last name, first name and salary, for example: Key Bobby 43000 I have an array of objects for each person, so I neeed to read this file and assign the last name, first name, and salary to … |
|
Hi, When we define any integer array like int a[3]={1,2,3}; then it will assign the values as a[0]=1, a[1]=2, and a[2]=3 But, when we define any character array as char a[3]={'a','b'}; then compiler here automatically consider '\0' null character to represent the end of the string So, my question here … |
|
Hi all, I have a double pointer in C as follows: [code] void foo(char * , char**); main( ) { char * inbuff = {0x10,0x20}; char * outbuff; foo(inbuff, (char **) &outbuff); } void foo(char *inbuff, char ** outbuff); { //code to manipulate inbuff and outbuff. *outbuff = (char *) … |
|
could somebody tell wats wrong with this #define FOR(x,n)for(typeof(x);x<n;x++) |
|
ok guys, i can not figure out the following problem that i faced just a while ago while trying out some filing in c++. the code is as follows: [code=c++] #include<iostream> #include<fstream> #include<string> using namespace std; int main() { ifstream readFile; readFile.open("Input.txt"); string sample; readFile>>sample; cout<<"Here is a line: "<<sample<<endl; … |
|
I've been trying to read characters from the keyboard using 'getchar()' but my code always misses one character. Can anyone tell me why this is [CODE=suntax]#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { char string[50]; int i; printf("Enter a string: "); for (i=0; i < strlen(string); … |
|
Hello to all, can anyone please explain to me the following: I know how to use the copy constructor, I know that it's used only in the initialization, when i wanna initialize a new object using an old object... But what I don't understand is how will I know when … |
|
Here's one of those "wacky news" stories. Some guy named his kid Adolf Hitler because he liked the name and "because no one else in the world would have that name." (there's a good reason for this). His daughter is named "Aryan Nation", probably for similar reasons. Anyway, they threw … |
|
In the following program, implement the function a. int *biggest(int *a, int count); This finds the largest element in an array of integers. #include <stdio.h> #define SIZE 16 int* biggest(int *a, int count); int main(void) { int values[16] = { 47, 17, 38, 91, 33, 24, 99, 35, 42, 10, … |
|
|
Hi, I have this sample program where the compiler gives me error for the break statement. The error is " misplaced break in afunction" Could anyone help me understanding why the break statement gives an error? i understand that u can use break in a for , while loop etc., … |
Ok I have this problem which is very simple yet I can't find the solution anywhere. I have a simple function: [CODE] bool MyClass::close(int fd) { // code shutdown(sockFd, 2); close(sockFd); //code } [/CODE] This function does a lot of work and one of the things it needs to do … |
|
Hello , I am developing an application in realtime and I need to update some values in an array. What is the best method to add a value to every position of an array? Thank you for your help. |
|
Hi again, first; i realise this peace of code is stupid, it has been taken out of context, altered for the sake of simplicity etc. I wonder if the problem is the quite large number stored in int to (changed to unsigned long int) i have read on cplusplus.com that … |
|
So basically, I'm creating a switch statement that if the user enters a p or if they enter a P it will still work, any ideas? Thank you |
|
Hello guys, I ve been searching for a long time for an algorithm (in c++) that would take the number of digits and give all the possible combinations between 0 and 1. For example for number of digits 3 will give 100 010 001 110 101 011 111 The funny … |
|
Hello, I have a question, How I can write a function that return 2 values. the function should take 3 numbers and do between the first and the second number an arethmetic operation and check if the result will be the third number, if yes the function return 1 and … |
|
Hi, I am pasting here code for finding path using Dijkstra algorithm. [icode] #include <stdio.h> #include <limits.h> #include <assert.h> typedef enum {false, true} bool; /* The order is rather important to get the boolean values right. */ typedef char *string; #define oo UINT_MAX /* infinity is represented as the maximum … |
|
Should I avoid casting between data types? I haven't really seen much about the use of this, but it seems like one of those last-minute-no-way-around kind of methods... but, for example, how would I use the length of a string in a for loop? The length property of a string … |
|
So I'm having trouble with classes today, I want to do something like [CODE] #include <iostream.h> using namespace std; class Dummy{ char Name[256]; void setName(char nam){Name=nam;} }; int main(){ char[256] temp; cout << "Name?\n"; cin >> temp; setName(temp); } [/CODE] I want something like this to store a char array … |
|
I have a child of std::exception defined as: [CODE=c++] struct image_load_failed : public std::exception { image_load_failed(std::string const s) : message(s) {} virtual ~image_load_failed() throw() {} const char* what() const throw() { return "image load failed";//message.c_str(); } std::string const message; }; [/CODE] (I would normally have what() return message.c_str(), but I've … |
|
Hi any one please tell me why the warning is generated when the address of pointer to a local variable is passed. [U]The following is the warning generated:[/U] Icore.c:228: warning: passing argument 3 of foo from incompatible pointer type [U]The function declaration is:[/U] int foo(void * , int , void**); … |
|
I am just curious, just how much of math do one really needs in order to make, say space invaderes, or pacman....WOW,..NBA LIVE 2009? It's not that i am bad at math or anything, in fact I am pretty good at it and still learning, calc.II. BUt i am curious, … |
|
There are 5 houses in five different colors In each house lives a different nationality. These 5 owners drink a certain beverage, smoke a certain brand of cigar and keep a certain pet. No owners have the same pet, smoke the same brand of cigar, or drink the same beverage. … |